:root {
  color-scheme: light;
  --bg-main: #0f0f10;
  --bg-soft: #1a1a1d;
  --surface: #1a1a1d;
  --surface-muted: #232326;
  --primary: #6b1f2a;
  --primary-hover: #7f2532;
  --primary-active: #571821;
  --secondary: #9ca3af;
  --accent: #d1d5db;
  --text-main: #f3f4f6;
  --text-soft: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #f3f4f6;
  --border: #2c2c30;
  --danger: #b4535f;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(107, 31, 42, 0.1), transparent 20%),
    linear-gradient(180deg, #151517, var(--bg-main));
  color: var(--text-main);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

.auth-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: stretch;
}

.auth-copy,
.auth-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-copy h1 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.session-user {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-soft);
}

.session-user strong {
  color: var(--text-main);
  font-size: 0.95rem;
}

.session-user small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.compact-search {
  min-width: min(280px, 100%);
}

.compact-card {
  margin-top: 18px;
}

.yard-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.yard-invite {
  display: grid;
  gap: 8px;
}

.yard-code-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.card-inline {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.yard-invite span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.landing-shell {
  min-height: 100vh;
  background: linear-gradient(to bottom right, #0f0f10, #1a1a1d);
  color: var(--text-main);
}

.landing-header,
.landing-section,
.landing-footer,
.hero-landing {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  align-items: start;
}

.hero .page-nav {
  grid-column: 1 / -1;
}

.brand-mark {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.landing-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.landing-nav a,
.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.landing-nav a:hover,
.footer-links a:hover {
  color: var(--text-main);
  transform: scale(1.02);
}

.hero-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
}

.hero-copy-wrap h1 {
  max-width: 680px;
  font-size: clamp(3rem, 6vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.landing-kicker {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-subtext {
  max-width: 640px;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  text-decoration: none;
}

.hero-panel {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-mini-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: #18181b;
  border: 1px solid var(--border);
}

.metric-card strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.metric-card span {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.landing-section {
  padding-top: 56px;
  padding-bottom: 56px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: all 0.2s ease-in-out;
}

.feature-card:hover {
  transform: scale(1.02);
}

.feature-card h3 {
  margin: 0 0 10px;
}

.feature-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(209, 213, 219, 0.12);
  background: rgba(107, 31, 42, 0.16);
}

.feature-icon span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: block;
}

.steps-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: center;
}

.step-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.step-block h3 {
  margin: 0 0 10px;
}

.step-block p {
  color: var(--text-soft);
  line-height: 1.7;
}

.step-index {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.step-divider {
  width: 32px;
  height: 1px;
  background: rgba(209, 213, 219, 0.2);
}

.trust-section {
  text-align: center;
  padding-top: 44px;
  padding-bottom: 44px;
}

.trust-section p {
  max-width: 860px;
  margin: 0 auto;
  color: var(--text-main);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.7;
}

.cta-section {
  padding-top: 22px;
  padding-bottom: 80px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid rgba(209, 213, 219, 0.08);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

button,
input,
select {
  font: inherit;
}

input[type="file"] {
  display: none;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 32px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.4rem;
}

.hero-copy {
  max-width: 700px;
  margin-top: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.page-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-soft);
  border: 1px solid var(--border);
  transition: all 0.2s ease-in-out;
}

.nav-link.active {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.nav-link:hover {
  transform: scale(1.02);
  background: rgba(107, 31, 42, 0.16);
}

.legal-panel {
  overflow: hidden;
}

.legal-content {
  max-width: 880px;
  display: grid;
  gap: 22px;
}

.legal-section {
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow);
}

.legal-section h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.legal-section p,
.legal-section li,
.legal-updated {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p,
.legal-section ul + ul {
  margin-top: 14px;
}

.legal-section ul {
  margin: 14px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.legal-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(209, 213, 219, 0.35);
  transition: all 0.2s ease-in-out;
}

.legal-link:hover {
  color: var(--text-main);
  border-bottom-color: var(--accent);
}

.legal-updated {
  padding: 8px 2px 0;
  color: var(--text-muted);
}

.nav-card {
  text-decoration: none;
  color: inherit;
}

.nav-card p {
  margin-top: 8px;
  color: var(--text-soft);
}

.compact-select {
  max-width: 220px;
}

.guide-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.guide-step,
.guide-note {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 18px;
  box-shadow: var(--shadow);
}

.guide-step h3,
.guide-note strong {
  margin: 0 0 8px;
}

.guide-step p,
.guide-note span {
  color: var(--text-soft);
  line-height: 1.5;
}

.guide-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--text-inverse);
  font-weight: 700;
  margin-bottom: 12px;
}

.guide-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 700;
}

.guide-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.action-feedback {
  min-height: 48px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.action-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.action-feedback-message {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.action-feedback-message.is-working::before,
.action-feedback-message.is-done::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.action-feedback-message.is-working::before {
  background: var(--primary);
  animation: pulse-dot 900ms ease-in-out infinite;
}

.action-feedback-message.is-done::before {
  background: var(--accent);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.full-width {
  grid-column: 1 / -1;
}

.panel {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-heading,
.card-header,
.horse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.horse-config {
  grid-template-columns: 1.35fr 1fr;
}

.horse-break-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.text-input,
.number-input,
.select-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  background: #141417;
  color: var(--text-main);
  transition: all 0.2s ease-in-out;
}

.text-input:focus,
.number-input:focus,
.select-input:focus {
  outline: 2px solid rgba(107, 31, 42, 0.18);
  border-color: var(--primary);
}

.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.button-busy {
  opacity: 0.78;
  position: relative;
}

.button-busy::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  vertical-align: -2px;
  animation: spin-ring 700ms linear infinite;
}

.button-success {
  box-shadow: 0 0 0 3px rgba(209, 213, 219, 0.14);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow);
}

.primary-button:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow);
  transform: scale(1.02);
}

.primary-button:active {
  background: var(--primary-active);
}

.secondary-button {
  background: var(--surface-muted);
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.file-button {
  display: inline-flex;
  align-items: center;
}

.danger-button {
  background: rgba(180, 83, 95, 0.12);
  color: var(--danger);
  border: 1px solid rgba(180, 83, 95, 0.24);
}

.secondary-button:hover,
.file-button:hover {
  background: #2a2a2f;
  border-color: rgba(107, 31, 42, 0.45);
  transform: scale(1.02);
}

.secondary-button:active,
.file-button:active {
  background: #202025;
}

.helper-text {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.availability-fieldset,
.exercise-details {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #18181b;
}

.availability-fieldset legend,
.exercise-details summary {
  padding: 0 6px;
  font-weight: 600;
  color: var(--text-main);
}

.exercise-details summary {
  cursor: pointer;
}

.horse-record-details .horse-record-summary {
  margin-top: 12px;
}

.horse-notes-history {
  margin-top: 14px;
}

.horse-history-card {
  display: grid;
  gap: 14px;
}

.horse-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.history-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

textarea.text-input {
  width: 100%;
  resize: vertical;
  min-height: 96px;
}

.day-checkboxes,
.exercise-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.day-checkboxes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.day-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.day-checkbox input {
  width: 16px;
  height: 16px;
}

.lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #141417;
}

.horse-fixed-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.fixed-schedule-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
}

.fixed-schedule-day {
  color: var(--text-main);
  font-weight: 600;
}

.drop-zone {
  margin-top: 14px;
  border: 1px dashed rgba(156, 163, 175, 0.28);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  color: var(--text-soft);
  background: rgba(156, 163, 175, 0.04);
}

.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(107, 31, 42, 0.12);
  color: var(--text-main);
}

.horse-card {
  cursor: grab;
}

.horse-card.dragging {
  opacity: 0.55;
}

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

.inline-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(209, 213, 219, 0.08);
  color: var(--text-main);
  font-size: 0.9rem;
  border: 1px solid rgba(209, 213, 219, 0.14);
}

.warnings {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.suggestions {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.warning-card {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(107, 31, 42, 0.3);
  background: rgba(107, 31, 42, 0.12);
  color: var(--text-main);
  padding: 12px 14px;
}

.suggestion-card {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(209, 213, 219, 0.12);
  background: var(--surface-muted);
  color: var(--text-main);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.diagnostic-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.diagnostic-fix {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.92rem;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.day-column {
  min-height: 260px;
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.day-column h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.schedule-entry {
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #18181b;
  margin-bottom: 10px;
  border-left: 5px solid transparent;
  border: 1px solid var(--border);
  transition: all 0.2s ease-in-out;
}

.schedule-entry:hover,
.week-card:hover,
.guide-step:hover,
.guide-note:hover,
.nav-card:hover {
  transform: scale(1.02);
}

.schedule-entry:last-child {
  margin-bottom: 0;
}

.schedule-entry strong {
  display: block;
  margin-bottom: 4px;
}

.schedule-entry span {
  display: block;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.exercise-note {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--accent);
}

.priority-high {
  border-left-color: var(--accent);
}

.priority-normal {
  border-left-color: var(--primary);
}

.priority-light {
  border-left-color: var(--secondary);
}

.two-week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.week-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: all 0.2s ease-in-out;
}

.week-card h3 {
  margin: 0 0 12px;
}

.mini-days {
  display: grid;
  gap: 10px;
}

.mini-day {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #18181b;
  border: 1px solid var(--border);
}

.daily-quick-view,
.daily-sheet {
  display: grid;
  gap: 12px;
}

.daily-sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.daily-horse-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.daily-note-input {
  min-height: 88px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.status-good {
  background: rgba(209, 213, 219, 0.08);
  color: var(--text-main);
}

.status-neutral {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-soft);
}

.status-alert {
  background: rgba(107, 31, 42, 0.16);
  color: var(--text-main);
}

.empty-state {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: #18181b;
  color: var(--text-soft);
  border: 1px dashed var(--border);
}

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

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

@media (max-width: 960px) {
  .landing-header,
  .hero-landing,
  .cta-card,
  .landing-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-landing,
  .feature-grid,
  .steps-row {
    grid-template-columns: 1fr;
  }

  .step-divider {
    width: 1px;
    height: 26px;
    justify-self: center;
  }

  .hero,
  .panel-heading,
  .card-header,
  .horse-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .config-grid,
  .horse-config,
  .exercise-grid,
  .day-checkboxes,
  .two-week-grid {
    grid-template-columns: 1fr;
  }

  .guide-flow,
  .guide-highlights {
    grid-template-columns: 1fr;
  }

  .guide-arrow {
    transform: rotate(90deg);
  }

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

@media (max-width: 720px) {
  .app-shell,
  .landing-header,
  .landing-section,
  .landing-footer,
  .hero-landing {
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-shell {
    padding-top: 22px;
    padding-bottom: 40px;
  }

  h1 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  h2 {
    font-size: 1.2rem;
  }

  .hero {
    gap: 18px;
    margin-bottom: 22px;
  }

  .hero-copy {
    margin-top: 10px;
    font-size: 0.96rem;
  }

  .session-meta {
    justify-content: flex-start;
    width: 100%;
  }

  .page-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .page-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .panel {
    padding: 18px;
  }

  .panel-heading,
  .daily-sheet-header {
    gap: 12px;
  }

  .compact-select,
  .compact-search {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .hero-actions,
  .yard-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions > *,
  .yard-actions > *,
  .panel-heading > .secondary-button,
  .panel-heading > .primary-button,
  .panel-heading > .select-input,
  .panel-heading > .text-input {
    width: 100%;
  }

  .card,
  .legal-section,
  .day-column,
  .week-card {
    padding: 16px;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .day-column {
    min-height: 0;
  }

  .day-column h3 {
    margin-bottom: 10px;
  }

  .two-week-grid,
  .feature-grid,
  .guide-highlights,
  .history-plan-grid {
    grid-template-columns: 1fr;
  }

  .hero-metric-grid {
    grid-template-columns: 1fr;
  }

  .landing-button,
  .primary-button,
  .secondary-button,
  .danger-button,
  .file-button {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .auth-copy,
  .auth-form,
  .panel {
    padding: 16px;
  }

  .landing-header {
    padding-top: 18px;
  }

  .hero-landing {
    padding-top: 34px;
    padding-bottom: 46px;
    gap: 22px;
  }

  .hero-copy-wrap h1 {
    line-height: 1;
  }

  .landing-subtext,
  .trust-section p {
    font-size: 0.98rem;
  }

  .config-grid,
  .horse-break-grid,
  .yard-code-grid,
  .guide-flow,
  .exercise-grid,
  .day-checkboxes,
  .fixed-schedule-row {
    grid-template-columns: 1fr;
  }

  .card-inline,
  .landing-footer,
  .cta-card {
    flex-direction: column;
    align-items: stretch;
  }

  .code-row,
  .inline-info,
  .horse-history-meta {
    gap: 8px;
  }

  .status-pill {
    align-self: flex-start;
  }

  .daily-horse-block {
    gap: 8px;
  }

  .legal-content {
    gap: 16px;
  }
}

@media print {
  body {
    background: white;
  }

  .hero-actions,
  .panel:nth-child(1),
  .panel:nth-child(2),
  .warnings,
  .suggestions {
    display: none !important;
  }

  .app-shell {
    max-width: none;
    padding: 0;
  }

  .panel,
  .day-column {
    box-shadow: none;
    border: 1px solid var(--border);
    background: white;
  }

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

  .two-week-grid {
    grid-template-columns: 1fr;
  }
}
