.record-editor-root {
  --editor-teal: #1bbeaa;
  --editor-yellow: #ffd32d;
  --editor-red: #ff6060;
  color: var(--color-text);
  background: transparent;
  font-family: var(--font-app);
}

.record-editor-root.is-keyboard-settling,
.record-inline-modal.is-keyboard-settling,
.long-text-editor-overlay.is-keyboard-settling {
  pointer-events: auto;
}
.record-editor-root.is-keyboard-settling > *,
.record-inline-modal.is-keyboard-settling > *,
.long-text-editor-overlay.is-keyboard-settling > * { pointer-events: none; }

.record-editor-root .record-page-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  height: calc(100% - 74px);
  max-height: calc(100% - 74px);
  padding: 0 16px 32px;
  overflow: auto;
  border-radius: 28px 28px 0 0;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: 0 -8px 40px rgb(0 0 0 / 25%);
}
.record-editor-root .record-page-panel--session { display: flex; flex-direction: column; padding: 0; overflow: hidden !important; touch-action: pan-y; }
.record-page-fixed-header { position: relative; z-index: 7; width: 100%; flex: 0 0 auto; padding: 0 16px; background: var(--color-surface); }
.record-page-scroll { width: 100%; height: 0; min-height: 0; flex: 1 1 0; padding: 0 16px 16px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--color-surface-alt); touch-action: pan-y; -webkit-overflow-scrolling: touch; }

.record-editor-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 50%);
}

.record-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 16px;
}

.record-modal-title__copy { flex: 1; min-width: 0; }
.record-modal-title h1 { margin: 0; color: var(--editor-teal); font-size: 18px; font-weight: 900; line-height: 1.15; }
.record-modal-title p { margin: 2px 0 0; color: var(--color-muted); font-size: 12px; font-weight: 600; }
.record-modal-title__actions { display: flex; align-items: center; gap: 7px; }

.record-icon-button {
  display: grid;
  width: var(--app-modal-action-size, 38px);
  height: var(--app-modal-action-size, 38px);
  flex: 0 0 var(--app-modal-action-size, 38px);
  border: 0;
  border-radius: 50%;
  color: var(--color-muted);
  background: var(--color-input);
  font-weight: 900;
  place-items: center;
}

.record-icon-button.is-active { color: #5a4400; background: var(--editor-yellow); }
.record-modal-title__save { color: var(--editor-teal); background: color-mix(in srgb, var(--editor-teal), transparent 88%); }
.record-modal-title__delete { color: #d72649; background: rgb(255 96 96 / 9%); }
.record-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 16px; background: var(--color-input); }
.record-tabs button { min-width: 0; height: 38px; padding: 0 4px; border: 0; border-radius: 13px; color: var(--color-muted); background: transparent; font-size: 11px; font-weight: 900; }
.record-tabs button[aria-pressed="true"] { color: #fff; background: var(--editor-teal); }
.record-tabs__icon,
.record-tabs button > i { display: none; }
.record-page-mobile-nav { display: none; }
.record-tabs--mobile { margin: 0; }
.record-editor-error { padding: 8px 10px; margin: 0 10px 10px; border: 1px solid color-mix(in srgb, var(--editor-red), transparent 65%); border-radius: 10px; color: #9f1730; background: color-mix(in srgb, var(--editor-red), transparent 92%); font-size: 12px; font-weight: 800; }

.record-section {
  min-height: 560px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface-alt);
}
.record-tab-stage { width: 100%; min-width: 0; min-height: 100%; }
.record-tab-stage.is-entering-forward { animation: record-tab-enter-forward 180ms cubic-bezier(.22, .75, .3, 1); }
.record-tab-stage.is-entering-backward { animation: record-tab-enter-backward 180ms cubic-bezier(.22, .75, .3, 1); }
@keyframes record-tab-enter-forward {
  from { opacity: .55; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes record-tab-enter-backward {
  from { opacity: .55; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .record-tab-stage.is-entering-forward,
  .record-tab-stage.is-entering-backward { animation: none; }
}
.record-card { padding: 12px; margin-bottom: 12px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); }
.record-section.record-section--preparation { padding: 12px 0 0; border: 0; border-radius: 0; background: transparent; }
.record-section.record-section--summary { padding: 12px 0 0; border: 0; border-radius: 0; background: transparent; }
.record-preparation-card .record-label { margin-left: 0; text-align: center; }
.record-preparation-card select.record-input {
  padding-right: 28px;
  padding-left: 28px;
  text-align: center;
  text-align-last: center;
}
.record-preparation-card input.record-date-time-input { text-align: center; }
.record-preparation-card input.record-date-time-input::-webkit-date-and-time-value { text-align: center; }
.record-preparation-card input.record-date-time-input::-webkit-datetime-edit { justify-content: center; }
.record-summary-card { margin-bottom: 12px; }
.record-objectives-card { margin-bottom: 0; }
.record-objectives-card .session-objectives { padding-top: 0; margin-top: 0; border-top: 0; }
.training-rating { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--color-border); }
.training-rating > .record-label { display: block; margin: 0 0 8px; text-align: center; }
.training-rating__stars { display: flex; align-items: center; justify-content: center; gap: 8px; }
.training-rating__star { display: grid; width: 44px; height: 44px; padding: 7px; border: 0; color: var(--color-border); background: transparent; place-items: center; }
.training-rating__star svg { width: 100%; height: 100%; fill: transparent; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.7; }
.training-rating__star.is-filled { color: var(--editor-teal); }
.training-rating__star.is-filled svg { fill: var(--editor-teal); }
.training-rating__star:focus-visible { border-radius: 10px; outline: 2px solid var(--editor-teal); outline-offset: 1px; }
.session-temporal { --temporal-accent: var(--editor-teal); padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--color-border); }
.session-temporal--constraint { --temporal-accent: var(--editor-red); }
.session-temporal > header { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; }
.session-temporal h3 { margin: 0; color: var(--temporal-accent); font-size: 12px; font-weight: 900; }
.session-temporal__create-row { display: flex; justify-content: center; padding: 7px 0; margin: 0 2px 9px; border-top: 1.5px dashed color-mix(in srgb, var(--temporal-accent), transparent 52%); border-bottom: 1.5px dashed color-mix(in srgb, var(--temporal-accent), transparent 52%); }
.session-temporal__create-row button { display: grid; width: 36px; height: 36px; padding: 0; border: 1.5px solid color-mix(in srgb, var(--temporal-accent), transparent 35%); border-radius: 11px; color: var(--temporal-accent); background: transparent; font-size: 22px; font-weight: 900; place-items: center; }
.session-temporal > p { padding: 10px 12px; margin: 0; border-radius: 12px; color: var(--color-muted); background: var(--color-input); font-size: 12px; font-weight: 700; }
.session-temporal > .session-temporal__hint { margin: 0 2px 8px; color: var(--color-muted); background: color-mix(in srgb, var(--temporal-accent), transparent 94%); }
.session-temporal__list { display: grid; gap: 7px; }
.session-temporal-row { position: relative; display: flex; width: 100%; align-items: stretch; gap: 6px; overflow: hidden; border-radius: 13px; }
.session-temporal-choice { display: flex; min-width: 0; flex: 1; align-items: center; gap: 6px; padding: 7px; border: 1.5px solid var(--color-border); border-radius: 13px; color: var(--color-text); background: var(--color-surface); }
.session-temporal-choice.is-selected { border-color: var(--temporal-accent); background: color-mix(in srgb, var(--temporal-accent) 7%, var(--color-surface)); }
.session-temporal-choice__edit { display: grid; width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 1px solid color-mix(in srgb, var(--temporal-accent), transparent 65%); border-radius: 9px; color: var(--temporal-accent); background: color-mix(in srgb, var(--temporal-accent), transparent 91%); font-size: 13px; font-weight: 900; place-items: center; }
.session-temporal-choice__toggle { display: flex; width: 100%; min-width: 0; flex: 1; align-items: center; gap: 6px; padding: 3px; border: 0; color: inherit; background: transparent; text-align: left; }
.session-temporal-choice__check { display: grid; width: 24px; height: 24px; flex: 0 0 24px; border: 1.5px solid var(--color-border); border-radius: 8px; color: #fff; background: var(--color-surface); font-size: 15px; font-weight: 900; place-items: center; }
.session-temporal-choice.is-selected .session-temporal-choice__check { border-color: var(--temporal-accent); background: var(--temporal-accent); }
.session-temporal-choice__copy { min-width: 0; flex: 1; padding: 3px; border: 0; color: inherit; background: transparent; text-align: left; }
.session-temporal-choice strong, .session-temporal-choice small { display: block; }
.session-temporal-choice strong { font-size: 12px; font-weight: 900; line-height: 1.35; }
.session-temporal-choice small { margin-top: 3px; color: var(--color-muted); font-size: 10px; font-weight: 700; }
.session-temporal-choice__historical { padding-right: 4px; white-space: nowrap; }
.session-temporal-row__actions-mobile { display: none; }
.record-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.record-field-grid--three { grid-template-columns: minmax(0, 1.08fr) minmax(0, .98fr) minmax(0, .76fr); margin-bottom: 12px; }
.record-field { min-width: 0; }
.record-native-date-time-control { position: relative; display: block; width: 100%; height: 42px; min-width: 0; overflow: hidden; border-radius: 14px; }
.record-native-date-time-control .record-date-time-input { position: absolute; inset: 0; }
.record-field + .record-field--block, .record-field--block { margin-top: 8px; }
.record-label { display: block; margin: 0 0 6px 2px; color: var(--editor-teal); font-size: 11px; font-weight: 800; }
.record-input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  outline: 0;
  color: var(--color-text);
  background: var(--color-input);
  font-size: 14px;
  font-weight: 600;
}
select.record-input, input.record-input--compact { height: 42px; padding: 0 10px; font-size: 13px; font-weight: 900; }
textarea.record-input { resize: none; overflow: hidden; line-height: 1.45; }
.record-input--objective { min-height: 48px; }
.record-input--summary { min-height: 104px; }
.record-input--medium { min-height: 70px; }
.record-input--short { min-height: 48px; }

.record-add-entry {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #5a4400;
  background: var(--editor-yellow);
  font-size: 13px;
  font-weight: 900;
}

.technical-entry-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.technical-entry-list__empty { padding: 14px; border: 1px dashed var(--color-border); border-radius: 14px; color: var(--color-muted); background: var(--color-surface); font-size: 12px; font-weight: 700; text-align: center; }
.technical-entry-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.technical-entry-row__main { flex: 1; min-width: 0; }
.technical-entry-row__open { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.technical-entry-row__open > strong { display: block; overflow: hidden; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.technical-entry-row__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.technical-entry-row__badges span { padding: 2px 7px; border: 1px solid rgb(27 190 170 / 15%); border-radius: 999px; color: var(--editor-teal); background: rgb(27 190 170 / 7%); font-size: 10px; font-weight: 900; line-height: 1.1; }
.technical-entry-row__badges span[data-kind="distance"] { border-color: rgb(255 211 45 / 27%); color: #7a5c00; background: rgb(255 211 45 / 8%); }
.technical-entry-row__badges span[data-kind="count"] { border-color: rgb(122 148 144 / 20%); color: var(--color-text); background: var(--color-input); }
.technical-entry-row__summary { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; color: var(--color-muted); font-size: 11px; font-weight: 800; line-height: 1.35; }
.technical-entry-row__summary strong { color: var(--color-text); font-weight: 900; }
.technical-entry-row__average { color: #e12646; font-style: normal; font-weight: 900; }
.technical-entry-row__average.is-warmup { color: #ff8c42; }
.technical-entry-row__delete { width: 30px; height: 30px; flex: 0 0 30px; border: 0; border-radius: 10px; color: var(--editor-red); background: color-mix(in srgb, var(--editor-red), transparent 91%); font-size: 16px; font-weight: 900; }
.technical-entry-row__delete svg { display: block; width: 16px; height: 16px; margin: auto; }
.record-section.record-section--activity {
  display: flex;
  min-height: 0;
  padding: 12px 0 0;
  border: 0;
  flex-direction: column;
  gap: 12px;
  background: transparent;
}
.activity-session-card {
  min-width: 0;
  padding: 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
}
.activity-session-details { display: flex; min-width: 0; flex-direction: column; gap: 10px; }
.activity-session-records { --session-record-highlight: var(--editor-teal); display: flex; min-width: 0; flex-direction: column; }
.record-page-scroll--session .record-tab-stage { display: flex; min-height: 100%; flex-direction: column; }
.record-page-scroll--session .record-section--session { min-height: 100%; flex: 1 0 auto; margin-bottom: 0; box-sizing: border-box; }
.record-page-scroll--session .activity-session-card--records { flex: 0 0 auto; }
.session-session-dock { flex: 0 0 auto; margin-top: auto; }
.session-quick-actions {
  display: grid;
  width: 100%;
  max-width: 254px;
  grid-template-columns: repeat(2, minmax(60px, 90px));
  justify-content: center;
  gap: clamp(12px, 4vw, 32px);
  padding: 0 8px;
  margin: 24px auto;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.session-quick-action {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 3px dashed color-mix(in srgb, var(--color-muted), transparent 42%);
  border-radius: 18px;
  color: var(--color-muted);
  background: transparent;
  place-items: center;
  touch-action: pan-y;
}
.session-quick-action svg { display: block; width: 43%; height: 43%; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.session-quick-action.is-active { border-style: solid; box-shadow: 0 9px 22px color-mix(in srgb, currentColor, transparent 76%); }
.session-quick-action.is-active svg { fill: currentColor; }
.session-quick-action--star.is-active {
  border-color: #ffd32d;
  color: #e2ab00;
  background: radial-gradient(circle, #fffde8 0%, #fff49a 48%, #ffd32d 145%);
  box-shadow: 0 0 10px rgb(255 211 45 / 75%), 0 0 25px rgb(255 211 45 / 52%);
}
.session-quick-action--eye.is-active { border-color: #2b86d1; color: #2b86d1; background: color-mix(in srgb, #2b86d1, transparent 90%); }
.session-quick-action--eye.is-active svg { fill: none; stroke-width: 1.55; }
.session-quick-action--eye.is-active svg circle { fill: currentColor; stroke: currentColor; }
[data-theme="dark"] .session-quick-action--star.is-active {
  color: #ffd32d;
  background: radial-gradient(circle, #6f5a00 0%, #403500 72%, #2b2400 100%);
}
.session-presence-summary {
  display: flex;
  width: min(720px, 100%);
  min-width: 0;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 12px 4px;
  margin: 0 auto;
  pointer-events: none;
}
.session-session-dock > .session-presence-summary { padding-bottom: 24px; margin-top: -8px; }
.session-presence-bubble {
  max-width: 100%;
  padding: 10px 15px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--presence-accent), transparent 68%);
  border-radius: 18px;
  color: var(--color-text);
  background: color-mix(in srgb, var(--presence-accent), var(--color-surface) 93%);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--presence-accent), transparent 82%), 0 3px 8px rgb(19 42 38 / 10%);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-line;
  transform: translateY(-2px);
}
.session-presence-bubble--objective { --presence-accent: var(--editor-teal); }
.session-presence-bubble--constraint { --presence-accent: var(--editor-red); }
.activity-session-records > header { display: flex; align-items: center; margin: 0 2px 8px; }
.activity-session-records h3 { margin: 0; color: var(--editor-teal); font-size: 12px; font-weight: 900; }
.record-section--activity .activity-session-records .technical-entry-list { margin-top: 14px; }
.activity-session-records .technical-entry-row {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1.5px solid var(--session-record-highlight);
}
[data-theme="dark"] .activity-session-records h3 { color: var(--editor-teal); }
.activity-conditions-panel { display: flex; min-width: 0; flex-direction: column; gap: 10px; }
.activity-conditions { padding: 12px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.activity-session-card--details .activity-conditions,
.activity-session-card--details .activity-equipment { padding: 0; border: 0; border-radius: 0; background: transparent; }
.activity-conditions__grid { display: grid; gap: 8px; }
.activity-conditions__grid--athlete { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.activity-conditions__grid--external { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.activity-conditions .record-label { margin-left: 0; text-align: center; }
.activity-condition-slider { width: 100%; min-width: 0; }
.activity-condition-slider__control { display: grid; width: 100%; height: 46px; grid-template-columns: 12px minmax(0, 1fr) 12px; gap: 8px; align-items: center; }
.activity-condition-slider__control > small { color: var(--color-muted); font-size: 10px; font-weight: 900; line-height: 1; text-align: center; text-transform: lowercase; }
.activity-condition-slider__range { position: relative; display: flex; min-width: 0; height: 46px; align-items: center; }
.activity-condition-slider__ticks { position: absolute; right: 6px; left: 6px; top: 50%; display: flex; align-items: center; justify-content: space-between; pointer-events: none; transform: translateY(-50%); }
.activity-condition-slider__ticks::before { position: absolute; right: 0; left: 0; height: 5px; border-radius: 999px; background: var(--color-border); content: ''; }
.activity-condition-slider__ticks i { position: relative; z-index: 1; width: 8px; height: 8px; border: 2px solid var(--color-surface); border-radius: 50%; background: var(--color-muted); }
.activity-condition-slider input[type="range"] {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.activity-condition-slider input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: transparent; }
.activity-condition-slider input[type="range"]::-webkit-slider-thumb { width: 29px; height: 29px; margin-top: -12px; border: 3px solid var(--color-surface); border-radius: 50%; background: var(--editor-teal); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--editor-teal), transparent 30%); appearance: none; -webkit-appearance: none; }
.activity-condition-slider input[type="range"].is-unset::-webkit-slider-thumb { opacity: 0; }
.activity-condition-slider input[type="range"]::-moz-range-track { height: 5px; border-radius: 999px; background: transparent; }
.activity-condition-slider input[type="range"]::-moz-range-thumb { width: 25px; height: 25px; border: 3px solid var(--color-surface); border-radius: 50%; background: var(--editor-teal); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--editor-teal), transparent 30%); }
.activity-condition-slider input[type="range"].is-unset::-moz-range-thumb { opacity: 0; }
.activity-conditions select.record-input {
  padding-right: 24px;
  padding-left: 24px;
  text-align: center;
  text-align-last: center;
}
.activity-equipment {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
}
.activity-equipment__title { display: block; margin: 0 0 9px 2px; font-size: 13px; font-weight: 900; }
.activity-equipment__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.activity-equipment__item { min-width: 0; }
.activity-equipment__control { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 6px; }
.activity-equipment__control select { min-width: 0; }
.activity-equipment__edit {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 11px;
  color: var(--editor-teal);
  background: var(--color-input);
  font-size: 19px;
  font-weight: 900;
  place-items: center;
}
.activity-equipment__edit:disabled { cursor: not-allowed; opacity: .38; }
.activity-equipment__summary { display: flex; min-width: 0; flex-direction: column; gap: 3px; padding: 7px 2px 0; color: var(--color-muted); font-size: 10px; font-weight: 700; line-height: 1.35; }
.activity-equipment__materials { overflow-wrap: anywhere; }
.activity-equipment__tuning { display: flex; flex-wrap: wrap; gap: 3px 9px; }
.activity-equipment__tuning strong { color: var(--color-text); }
.activity-equipment-editor {
  --materials-card: var(--color-surface);
  --materials-text: var(--color-text);
  --materials-muted: var(--color-muted);
  --materials-border: var(--color-border);
  --materials-input: var(--color-input);
  --materials-teal: var(--editor-teal);
  --materials-red: var(--editor-red);
  width: min(720px, calc(100vw - 64px));
  height: min(82dvh, 720px);
}
.activity-equipment-editor .app-page-modal__scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.activity-equipment-editor__content { min-width: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.activity-equipment-editor__tuning { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-section--activity .record-add-entry { flex: 0 0 auto; }
.record-section--activity .technical-entry-list { margin-top: 0; }
.activity-entry-create-row { display: flex; justify-content: center; padding: 7px 0; border-top: 1.5px dashed color-mix(in srgb, var(--editor-teal), transparent 34%); border-bottom: 1.5px dashed color-mix(in srgb, var(--editor-teal), transparent 34%); }
.activity-entry-create-row button { display: grid; width: 38px; height: 38px; padding: 0; border: 1.5px solid color-mix(in srgb, var(--editor-teal), #0b6f62 18%); border-radius: 11px; color: var(--editor-teal); background: color-mix(in srgb, var(--editor-teal), transparent 92%); font-size: 24px; font-weight: 900; line-height: 1; place-items: center; }
[data-theme="dark"] .activity-entry-create-row button { color: var(--editor-teal); }
.record-inline-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--visual-viewport-height, 100dvh);
  padding: 20px;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  background: rgb(0 0 0 / 45%);
}
.record-inline-modal__panel { position: relative; width: 100%; max-width: 430px; max-height: calc(var(--visual-viewport-height, 100dvh) - 40px); padding: 16px; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; border: 1.5px solid var(--color-border); border-radius: 20px; background: var(--color-surface); box-shadow: 0 18px 50px rgb(0 0 0 / 28%); }
.record-inline-modal__header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.record-inline-modal__header > div { flex: 1; min-width: 0; }
.record-inline-modal__header h2 { font-size: 17px; font-weight: 900; }
.record-inline-modal__header p { margin-top: 1px; color: var(--color-muted); font-size: 12px; font-weight: 600; }
.record-inline-modal__close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; padding: 0; border: 0; border-radius: 50%; color: var(--color-muted); background: var(--color-input); font-weight: 900; place-items: center; }
.record-inline-modal__close svg { display: block; }
.record-format-modal .record-inline-modal__panel { border-color: color-mix(in srgb, var(--color-teal), transparent 42%); background: #eaf8f6; transform: translateY(-5dvh); }
.record-format-modal .record-inline-modal__header h2 { color: var(--color-teal); }

.record-close-confirm {
  --confirm-save-accent: var(--color-teal, #1bbeaa);
  --confirm-save-ink: #fff;
  position: fixed;
  inset: 0;
  display: grid;
  height: var(--visual-viewport-height, 100dvh);
  padding: 18px;
  background: rgb(0 0 0 / 52%);
  place-items: center;
}
.record-close-confirm[data-confirm-theme="constraint"] { --confirm-save-accent: #e83e54; }
.record-close-confirm[data-confirm-theme="observation"] { --confirm-save-accent: #2b86d1; }
.record-close-confirm[data-confirm-theme="note"],
.record-close-confirm[data-confirm-theme="goldenMoment"] { --confirm-save-accent: var(--color-note-accent, #ffd32d); --confirm-save-ink: #5a4400; }
.record-close-confirm__panel {
  width: min(100%, 430px);
  padding: 20px;
  border: 0;
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 22px 60px rgb(0 0 0 / 32%);
}
.record-close-confirm__panel h2 { margin: 0; font-size: 19px; font-weight: 900; }
.record-close-confirm__panel p { margin: 7px 0 18px; color: var(--color-muted); font-size: 13px; font-weight: 700; }
.record-close-confirm__effects { display: grid; gap: 8px; padding: 0; margin: 0 0 18px; list-style: none; }
.record-close-confirm__effect { display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--color-border); border-radius: 12px; background: var(--color-input); }
.record-close-confirm__effect strong { color: var(--color-text); font-size: 13px; font-weight: 900; }
.record-close-confirm__effect span { color: var(--color-muted); font-size: 12px; font-weight: 700; line-height: 1.35; }
.record-close-confirm__effect.is-warning { border-color: #efbd4a; background: color-mix(in srgb, #efbd4a, var(--color-surface) 88%); }
.record-close-confirm__effect.is-destructive { border-color: #e83e54; background: color-mix(in srgb, #e83e54, var(--color-surface) 92%); }
.record-close-confirm__effective-at { display: grid; gap: 7px; margin: 0 0 14px; color: var(--color-text); font-size: 13px; font-weight: 900; }
.record-close-confirm__effective-at input { min-height: 46px; padding: 0 12px; border: 1.5px solid var(--color-border); border-radius: 13px; outline: 0; color: var(--color-text); background: var(--color-input); font: inherit; }
.record-close-confirm__effective-at input:focus { border-color: var(--confirm-save-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--confirm-save-accent), transparent 78%); }
.record-close-confirm__effective-at small { color: #c92f47; font-size: 12px; }
.record-close-confirm__reason { display: grid; gap: 7px; margin: 0 0 18px; color: var(--color-text); font-size: 13px; font-weight: 900; }
.record-close-confirm__reason textarea { min-height: 92px; padding: 12px; border: 1.5px solid var(--color-border); border-radius: 13px; outline: 0; color: var(--color-text); background: var(--color-input); font: inherit; line-height: 1.4; resize: vertical; }
.record-close-confirm__reason textarea:focus { border-color: var(--confirm-save-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--confirm-save-accent), transparent 78%); }
.record-close-confirm__reason small { color: #c92f47; font-size: 12px; }
.record-close-confirm__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.record-close-confirm--two-actions .record-close-confirm__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-close-confirm__actions button {
  min-height: 44px;
  padding: 0 8px;
  border: 1.5px solid var(--color-border);
  border-radius: 13px;
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 900;
}
.record-close-confirm__actions .is-save { border-color: var(--confirm-save-accent); color: var(--confirm-save-ink); background: var(--confirm-save-accent); }
.record-close-confirm__actions .is-discard { border-color: var(--color-border); color: var(--color-muted); background: var(--color-input); }

.long-text-editor-overlay { position: fixed; inset: 0; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); overflow: hidden; overscroll-behavior: none; touch-action: none; background: var(--color-surface); box-shadow: 0 0 0 100vh var(--long-text-editor-shield, var(--color-surface)); }
.long-text-editor-overlay__header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.long-text-editor-overlay__header strong { flex: 1; color: var(--editor-teal); font-size: 15px; font-weight: 900; }
.long-text-editor-overlay__field { display: flex; min-height: 0; flex: 1; margin: 0 2px; overflow: hidden; border: 1.5px solid var(--editor-teal); border-radius: 18px; background: var(--color-input); }
.objective-long-text-editor .long-text-editor-overlay__field { border: 2px solid var(--color-teal); }
.objective-long-text-editor.constraint-long-text-editor .long-text-editor-overlay__field { border-color: #e83e54; }
.long-text-editor-overlay--no-shortcuts .long-text-editor-overlay__field { margin-bottom: 12px; }
.long-text-editor-overlay textarea { width: 100%; min-height: 0; flex: 1; padding: 14px 14px 18px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; -webkit-appearance: none; appearance: none; border: 0; border-radius: 0; outline: 0 !important; color: var(--color-text); background: transparent; box-shadow: none !important; font-size: 16px; font-weight: 700; line-height: 1.5; resize: none; }
.long-text-editor-overlay__nav { display: flex; min-height: 64px; flex: 0 0 auto; gap: 8px; align-items: center; padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px); margin: 0 -10px -16px; border-top: 1.5px solid var(--color-border); background: var(--color-surface); }
.long-text-editor-overlay__nav > span { min-width: 6px; flex: 1 1 10px; }
.long-text-editor-overlay__nav button { width: auto; max-width: min(62vw, 260px); height: 40px; min-width: 0; flex: 0 1 auto; padding: 0 12px; overflow: hidden; border: 1.5px solid var(--color-border); border-radius: 13px; color: var(--color-text); background: var(--color-surface); font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .technical-entry-row__badges span[data-kind="distance"],
[data-theme="dark"] .record-format-modal .record-inline-modal__panel { background: rgb(11 55 49 / 98%); }

@media (max-width: 767px) {
  .record-editor-root .record-page-panel { width: 100%; height: 100dvh; max-height: 100dvh; padding: env(safe-area-inset-top) 0 0; border-radius: 0; }
  .record-editor-root.is-text-editor-closing .record-page-panel--session {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
  }
  .record-editor-root .record-page-panel:not(.technical-modal-panel) { top: var(--visual-viewport-offset-top, 0px); }
  .record-inline-modal,
  .long-text-editor-overlay,
  .record-close-confirm {
    top: var(--visual-viewport-offset-top, 0px);
    bottom: auto;
    height: var(--visual-viewport-height, 100dvh);
  }
  .long-text-editor-overlay {
    padding: env(safe-area-inset-top, 0px) 0 0;
  }
  .long-text-editor-overlay__header {
    padding: 10px 4px 16px;
    margin: 0 10px;
  }
  .long-text-editor-overlay__field {
    margin: 0 12px;
  }
  .long-text-editor-overlay__nav {
    min-height: 52px;
    padding: 6px 12px;
    margin: 0;
  }
  .record-inline-modal { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .record-inline-modal__panel { max-height: 100%; }
  .record-editor-root .record-page-panel:not(.technical-modal-panel) { padding-bottom: 0; }
  .record-editor-root .record-page-panel--session .record-page-fixed-header { padding: 0; }
  .record-editor-root .record-page-panel--session .record-page-scroll { padding: 0 0 14px; }
  .record-editor-root .record-page-panel--session .record-page-scroll--session {
    padding-bottom: 0;
    overflow-y: auto;
  }
  .record-modal-title, .record-tabs--desktop, .record-section { margin-right: 10px; margin-left: 10px; }
  .record-tabs--desktop { display: none; }
  .session-temporal-row[data-temporal-swipe-row] { display: block; background: color-mix(in srgb, var(--temporal-accent), transparent 93%); touch-action: pan-y; }
  .session-temporal-row[data-temporal-swipe-row] .session-temporal-choice::after {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 0;
    width: 8px;
    height: 36px;
    border-radius: 7px 0 0 7px;
    background: var(--temporal-accent);
    content: '';
    pointer-events: none;
    transform: translateY(-50%);
  }
  .session-temporal-row[data-temporal-swipe-row] .session-temporal-choice {
    position: relative;
    z-index: 2;
    width: 100%;
    transition: transform 180ms cubic-bezier(.22, .75, .3, 1);
    will-change: transform;
  }
  .session-temporal-row[data-temporal-swipe-row].is-actions-open .session-temporal-choice { transform: translateX(calc(-1 * var(--temporal-actions-width))); }
  .session-temporal-row__actions-mobile {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: var(--temporal-actions-width);
    align-items: stretch;
    justify-content: flex-end;
  }
  .session-temporal-row__actions-mobile button {
    display: flex;
    width: 58px;
    padding: 4px 2px;
    border: 0;
    border-left: 1px solid color-mix(in srgb, var(--temporal-accent), transparent 78%);
    color: var(--temporal-accent);
    background: color-mix(in srgb, var(--temporal-accent), transparent 90%);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
  }
  .session-temporal-row__actions-mobile button:first-child {
    border-left: 0;
    box-shadow: -14px 0 0 color-mix(in srgb, var(--temporal-accent), transparent 90%);
  }
  .session-temporal-row__actions-mobile button.is-delete { color: var(--editor-red); background: color-mix(in srgb, var(--editor-red), transparent 91%); }
  .session-temporal-row__actions-mobile span { font-size: 15px; font-weight: 900; line-height: 1; }
  .session-temporal-row__actions-mobile small { font-size: 8px; font-weight: 900; }
  .session-temporal-choice__edit { display: none; }
  .record-page-mobile-nav {
    display: block;
    height: var(--mobile-navigation-height);
    flex: 0 0 var(--mobile-navigation-height);
    padding: 0 0 var(--mobile-navigation-safe-gap);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    box-sizing: border-box;
  }
  .session-quick-actions {
    width: 224px;
    max-width: calc(100% - 48px);
    grid-template-columns: repeat(2, 100px);
    justify-content: center;
    gap: 24px;
    padding: 0;
    margin: 0 auto 20px;
  }
  .session-session-dock { padding: 10px 0 16px; background: var(--color-surface-alt); }
  .session-session-dock > .session-presence-summary { padding: 0 12px; margin: 0 auto; }
  .session-quick-action { border-width: 2.5px; border-radius: 16px; }
  .record-tabs.record-tabs--mobile {
    display: grid;
    gap: 0;
    padding: var(--mobile-navigation-top-gap) 0 0;
    border-radius: 0;
    background: transparent;
  }
  .record-tabs--mobile button {
    position: relative;
    display: flex;
    height: var(--mobile-navigation-item-height);
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 4px 0 0;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
  }
  .record-tabs--mobile .record-tabs__icon { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; }
  .record-tabs--mobile .record-tabs__icon svg { display: block; width: 22px; height: 22px; }
  .record-tabs.record-tabs--mobile button[aria-pressed="true"] {
    color: var(--editor-teal);
    background: transparent;
    font-weight: 900;
  }
  .record-tabs--mobile button > i {
    display: block;
    width: 20px;
    height: 3px;
    margin-top: 1px;
    border-radius: 999px;
    background: var(--editor-teal);
  }
  .record-section { min-height: 560px; padding: 12px; }
  .activity-conditions { padding: 10px; }
  .activity-conditions__grid--external { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-conditions__grid--athlete { gap: 10px; }
  .activity-equipment { padding: 10px; }
  .activity-equipment__grid { grid-template-columns: 1fr; }
  .activity-equipment-editor { width: 100%; height: 100%; max-height: 100%; }
  .activity-equipment-editor__tuning { grid-template-columns: 1fr; }
  .record-field-grid--three { grid-template-columns: minmax(0, 1fr) minmax(112px, 1.15fr) 84px; gap: 6px; }
  .record-editor-root input.record-input {
    font-size: 16px !important;
    font-size-adjust: .44;
    -webkit-text-size-adjust: 100%;
  }
  .record-editor-root input.record-date-time-input {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    inline-size: 100%;
    min-inline-size: 0 !important;
    max-inline-size: 100%;
    padding-right: 7px;
    padding-left: 7px;
    overflow: hidden;
    font-size: 13px !important;
    font-size-adjust: none;
    font-weight: 800 !important;
    letter-spacing: 0;
    text-align: center;
  }
  .record-editor-root input.record-date-time-input::-webkit-date-and-time-value {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
  }
  .record-editor-root input.record-date-time-input::-webkit-datetime-edit {
    display: flex;
    width: 100%;
    padding: 0;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .record-modal-title h1 { font-size: 20px; line-height: 1.2; }
  .record-modal-title p { font-size: 13px; line-height: 1.35; }
}
