:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: rgba(255, 255, 255, 0.12);
  --panel-solid: rgba(255, 255, 255, 0.86);
  --text: #050505;
  --muted: #050505;
  --line: rgba(32, 36, 42, 0.2);
  --green: #2563eb;
  --blue: #2563eb;
  --amber: #f6c177;
  --red: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: #050505;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

#activity-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(246, 247, 249, 0.9) 0%, rgba(246, 247, 249, 0.54) 42%, rgba(246, 247, 249, 0) 100%),
    linear-gradient(180deg, rgba(246, 247, 249, 0), rgba(246, 247, 249, 0.24)),
    url("assets/friesian-horse-bg.png") center center / cover no-repeat,
    #08090b;
  transform: scale(1);
  transform-origin: center center;
  animation: horseCinematicRun 18s ease-in-out infinite alternate;
  will-change: transform, filter;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(246, 247, 249, 0.38), transparent 72%);
  pointer-events: none;
}

body::after {
  display: none;
}

body.rtl .view {
  direction: rtl;
}

@keyframes horseCinematicRun {
  0% {
    filter: brightness(0.42) contrast(1.3);
    transform: scale(1);
  }

  48% {
    filter: brightness(0.48) contrast(1.34);
    transform: scale(1.015);
  }

  100% {
    filter: brightness(0.44) contrast(1.32);
    transform: scale(1.008);
  }
}

@keyframes horseDustDrift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    opacity: 0.42;
    transform: translate3d(0, 0, 0);
  }

  50% {
    opacity: 0.68;
  }

  100% {
    background-position: -220px 0, -260px 0, -300px 0, -240px 0, 0 0;
    opacity: 0.42;
    transform: translate3d(-3%, -2%, 0);
  }
}

button,
input,
select,
textarea {
  font: inherit;
  color: #050505;
}

body,
body * {
  color: #050505;
}

input::placeholder,
textarea::placeholder {
  color: #050505;
}

button {
  cursor: pointer;
}

a {
  color: #050505;
  text-decoration: none;
}

.shell {
  width: calc(100vw - 32px);
  max-width: 780px;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 116px;
  padding: 14px 0;
  background: transparent;
}

.top-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

#logout-button.hidden {
  display: none;
}

.brand {
  position: absolute;
  left: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translateX(-50%);
}

.brand-mark {
  display: grid;
  width: 60px;
  height: 76px;
  place-items: center;
}

.brand-mark img {
  width: 60px;
  height: 76px;
  object-fit: contain;
}

.brand-name {
  display: grid;
  gap: 1px;
  line-height: 1;
  text-align: center;
}

.brand-name strong {
  font-size: calc(1rem + 2px);
  font-weight: 900;
}

.hidden {
  visibility: hidden;
}

.collapsed {
  display: none !important;
}

.view {
  display: none;
  min-height: calc(100vh - 84px);
  padding: 42px 0 80px;
}

.view.active {
  display: block;
}

.auth-view.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  margin: 0 auto;
  gap: 30px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #050505;
  font-size: calc(0.78rem + 2px);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: calc(2rem + 2px);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

#hero-title {
  font-size: calc(1.5rem + 2px);
  line-height: 1.25;
}

#home-title,
#history-title,
#tracker-title {
  font-size: calc(1.25rem + 2px);
  line-height: 1.2;
}

h2 {
  margin-bottom: 10px;
  font-size: calc(1rem + 2px);
}

.dashboard-head p,
.panel-head p,
#welcome-text {
  color: #050505;
  font-size: calc(0.9rem + 2px);
}

p {
  color: #050505;
  line-height: 1.55;
}

.auth-card,
.timer-card,
.detail-card,
.quick-stats article,
.activity-card,
.history-card,
.custom-activity,
.history-tools {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(32, 36, 42, 0.06);
}

.auth-card {
  padding: 20px;
}

.auth-card h2,
.auth-card p,
.auth-card .form-grid label,
.auth-card .signup-divider,
.auth-card .segmented button:not(.active) {
  color: #050505;
}

#hero-copy {
  max-width: 430px;
  color: #050505;
}

.segmented {
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.segmented button {
  width: 50%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #050505;
  font-weight: 900;
}

.segmented button.active {
  background: var(--blue);
  color: #050505;
}

.auth-view .eyebrow {
  color: #050505;
}

.auth-card .segmented button.active,
#auth-submit {
  border-color: #d0d5dd;
  background: #e7e9ee;
  color: #050505;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: #98a2b3;
  box-shadow: 0 0 0 3px rgba(152, 162, 179, 0.18);
}

.auth-card .security-note {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.auth-card .security-note strong,
.auth-card .security-note span {
  color: #050505;
}

.form-grid,
.custom-activity {
  display: grid;
  gap: 12px;
}

.form-grid label,
.custom-activity label,
.history-tools label {
  display: grid;
  gap: 7px;
  color: #050505;
  font-size: calc(0.9rem + 2px);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: #050505;
  text-shadow: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #050505;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-inline-end: 82px;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #050505;
  font-size: 0.9rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.password-toggle:focus-visible {
  border-radius: 6px;
  outline: 2px solid #667085;
  outline-offset: 1px;
}

.form-grid .signup-only,
.form-grid .reset-only {
  display: none;
}

.auth-card.signup-mode .form-grid .signup-only {
  display: grid;
}

.auth-card.signup-mode .signup-help,
.auth-card.signup-mode .signup-divider {
  display: block;
}

.auth-card.signup-mode .signup-social {
  display: grid;
}

.button,
.text-button,
.icon-button,
.link-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #050505;
  font-weight: 900;
  text-shadow: none;
}

.link-button {
  min-height: auto;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #050505;
  text-decoration: underline;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #050505;
}

#start-button,
#end-button,
#save-session-button {
  border-color: #d0d5dd;
  background: #e7e9ee;
  color: #050505;
}

.button.danger {
  border-color: #fecdca;
  background: #ffffff;
  color: #050505;
}

.status-text {
  min-height: 22px;
  margin: 0;
  color: #050505;
  font-size: calc(0.92rem + 2px);
}

.signup-help {
  margin: 0;
  color: #050505;
  font-size: calc(0.88rem + 2px);
}

.signup-divider {
  color: #050505;
  text-align: center;
}

.signup-social {
  gap: 10px;
}

.social-button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #050505;
  font-weight: 900;
  text-shadow: none;
}

.auth-card .button.secondary,
.auth-card .social-button {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #050505;
}

.security-note {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(246, 193, 119, 0.38);
  border-radius: 8px;
  background: #eff6ff;
}

.security-note span {
  color: #050505;
  font-size: calc(0.86rem + 2px);
}

.security-note {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.dashboard-head,
.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-head > div,
.panel-head > div {
  min-width: 0;
  flex: 1;
}

body.rtl .dashboard-head,
body.rtl .panel-head {
  direction: ltr;
  text-align: right;
}

body.rtl .dashboard-head > div,
body.rtl .panel-head > div {
  direction: rtl;
}

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

.quick-stats article {
  padding: 18px;
}

.quick-stats span,
.timer-card span,
.history-card span {
  display: block;
  color: #050505;
  font-size: calc(0.84rem + 2px);
}

.quick-stats strong {
  display: block;
  margin-top: 6px;
  font-size: calc(1.6rem + 2px);
}

.custom-activity {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
}

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

.activity-sections {
  display: grid;
  gap: 18px;
}

.activity-section {
  display: grid;
  gap: 10px;
}

.activity-section h2 {
  margin: 0;
  color: #050505;
  font-size: calc(0.9rem + 2px);
}

.activity-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.activity-card {
  min-height: 126px;
  padding: 16px;
  text-align: left;
}

body.rtl .activity-card {
  text-align: right;
}

.activity-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: calc(1rem + 2px);
}

.activity-card,
.activity-card strong,
.activity-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-card span {
  color: #050505;
  font-size: calc(0.9rem + 2px);
}

.category-card {
  min-height: 78px;
}

.category-group-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  align-content: start;
}

.activity-option-list {
  display: grid;
  gap: 6px;
}

.activity-option-button {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(5, 5, 5, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  color: #050505;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.activity-option-button:hover,
.activity-option-button:focus-visible {
  border-color: #050505;
  background: rgba(255, 255, 255, 0.68);
}

body.rtl .activity-option-button {
  text-align: right;
}

.activity-option-empty {
  margin: 0;
  padding: 10px 4px;
  color: #050505;
}

.category-card.active {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

body.rtl .category-card {
  text-align: right;
}

.tracker-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.timer-card,
.detail-card {
  padding: 18px;
}

.timer-card {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
}

.timer-card strong {
  display: block;
  width: 100%;
  margin: 12px 0 18px;
  font-size: calc(3rem + 2px);
  font-size: calc(clamp(2rem, 13cqi, 4rem) + 2px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vehicle-mode .timer-card {
  display: none;
}

.vehicle-mode .tracker-layout {
  grid-template-columns: 1fr;
}

.focus-mode .timer-card {
  display: none;
}

.timer-card[hidden] {
  display: none !important;
}

.focus-mode .tracker-layout {
  grid-template-columns: 1fr;
}

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

.field-grid label.full {
  grid-column: 1 / -1;
}

.horse-form {
  display: grid;
  gap: 16px;
}

.field-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.field-section h2 {
  margin: 0;
  color: #050505;
  font-size: calc(1rem + 2px);
}

#horse-feed-list {
  display: grid;
  gap: 12px;
}

.horse-feed-entry {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.horse-feed-entry strong {
  color: #050505;
}

.add-feed-button {
  justify-self: start;
}

.privacy-note {
  margin: 0 0 12px;
  color: #050505;
  font-size: calc(0.9rem + 2px);
  line-height: 1.5;
}

.checkbox-field {
  display: flex !important;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.conditional-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.conditional-fields.hidden {
  display: none;
}

.study-focus {
  display: grid;
  gap: 16px;
}

.study-focus header p {
  margin: 0;
  color: #050505;
}

.study-candle-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  text-align: center;
}

.study-candle-card span {
  color: #050505;
  font-weight: 900;
}

.study-candle-visual {
  display: flex;
  width: 90px;
  height: 126px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.study-candle-flame {
  position: relative;
  width: 20px;
  height: 31px;
  flex: 0 0 auto;
  margin-bottom: 5px;
  border-radius: 999px 999px 999px 0;
  background: #7a5a2d;
  transform: rotate(-8deg);
  transition: background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.study-candle-flame::after {
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: 7px;
  height: 14px;
  border-radius: 999px;
  background: #fff7d6;
  content: '';
}

.study-candle-flame.active {
  background: #f5a623;
  box-shadow: 0 0 24px rgba(246, 193, 119, 0.62);
  animation: candle-flicker 1.2s ease-in-out infinite alternate;
}

.study-candle-flame.burned-out {
  height: 0;
  margin: 0;
  opacity: 0;
}

.study-candle-body {
  position: relative;
  width: 48px;
  height: 82px;
  min-height: 3px;
  flex: 0 0 auto;
  border-radius: 7px 7px 4px 4px;
  background: #f3ead7;
  box-shadow: inset -8px 0 0 rgba(191, 164, 119, 0.16), 0 9px 14px rgba(0, 0, 0, 0.25);
  transition: height 500ms linear;
}

.study-candle-wick {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background: #26201b;
  transform: translateX(-50%);
}

.study-candle-wax-lip {
  width: 100%;
  height: 8px;
  border-radius: 7px;
  background: #fffaf0;
}

.study-candle-wax-drip {
  position: absolute;
  top: 4px;
  right: 7px;
  width: 7px;
  height: 18px;
  border-radius: 0 0 5px 5px;
  background: #fffaf0;
}

.study-candle-body.burned-out > * {
  display: none;
}

.study-candle-card strong {
  font-size: calc(2.5rem + 2px);
  line-height: 1;
}

.study-candle-progress {
  width: min(100%, 420px);
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.study-candle-progress > div {
  width: 0;
  height: 100%;
  background: #f6c177;
  transition: width 500ms linear;
}

.study-candle-complete {
  display: grid;
  width: min(100%, 520px);
  gap: 12px;
  padding-top: 4px;
}

.study-candle-complete.hidden {
  display: none;
}

.study-candle-complete p {
  margin: 0;
  color: #050505;
  font-weight: 800;
}

@keyframes candle-flicker {
  from {
    transform: rotate(-10deg) scale(0.96);
  }
  to {
    transform: rotate(-5deg) scale(1.04);
  }
}

.gym-workout-builder {
  display: grid;
  gap: 16px;
}

.gym-workout-builder header p,
.gym-section-title {
  margin: 0;
  color: #050505;
}

.workout-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workout-button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  color: #050505;
  font-weight: 900;
}

.workout-button.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #050505;
}

.gym-set-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.gym-list-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.gym-list-box h2 {
  margin: 0;
  color: #050505;
  font-size: calc(1.1rem + 2px);
}

.gym-rest-time {
  color: #050505;
  font-size: calc(2.4rem + 2px);
  line-height: 1;
}

.gym-entry-list {
  display: grid;
  gap: 8px;
}

.gym-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.gym-entry-row:last-child {
  border-bottom: 0;
}

.gym-entry-row span {
  display: grid;
  gap: 4px;
}

.gym-entry-row small {
  color: #050505;
}

.baloot-calculator {
  display: grid;
  gap: 16px;
}

.baloot-calculator header p,
.baloot-section-title {
  margin: 0;
  color: #050505;
}

.baloot-total-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.baloot-total-card,
.baloot-winner-box,
.baloot-dealer-box,
.baloot-score-history {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.baloot-total-card {
  text-align: center;
}

.baloot-total-card span,
.baloot-winner-box span,
.baloot-dealer-box span {
  color: #050505;
  font-weight: 800;
}

.baloot-total-card strong {
  font-size: calc(2.6rem + 2px);
  line-height: 1;
}

.baloot-winner-box strong {
  font-size: calc(1.25rem + 2px);
}

.baloot-dealer-box {
  width: 100%;
  color: #050505;
  text-align: center;
}

.baloot-dealer-box strong {
  font-size: calc(3rem + 2px);
  line-height: 1;
}

.baloot-dealer-box small {
  color: #050505;
}

.baloot-actions {
  margin-top: -2px;
}

.baloot-score-history h2 {
  margin: 0;
  color: #050505;
  font-size: calc(1.1rem + 2px);
}

.baloot-score-list {
  display: grid;
  gap: 8px;
}

.baloot-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.baloot-score-row:last-child {
  border-bottom: 0;
}

.history-tools {
  padding: 16px;
  margin-bottom: 16px;
}

.progress-dashboard {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.progress-dashboard h2,
.progress-dashboard h3 {
  margin: 0 0 12px;
}

.progress-dashboard h3 {
  margin-top: 18px;
  color: #050505;
  font-size: calc(0.95rem + 2px);
}

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

.progress-summary article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(246, 247, 249, 0.66);
}

.progress-summary span,
.progress-summary small,
.progress-row small,
.progress-bars p {
  color: #050505;
}

.progress-bars,
.progress-row {
  display: grid;
  gap: 9px;
}

.progress-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--blue);
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  padding: 18px;
}

.history-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.history-card h3 {
  margin: 0;
}

.history-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  color: #050505;
}

.history-details span {
  display: block;
  margin-bottom: 3px;
  font-weight: 800;
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: #050505;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-view.active,
  .tracker-layout,
  .dashboard-head,
  .panel-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-stats,
  .activity-section-grid,
  .field-grid,
  .history-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #activity-canvas {
    background-position: center center, center center, 68% center;
  }

  .shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    grid-template-columns: 64px 1fr auto;
  }

  h1 {
    font-size: calc(2rem + 2px);
  }

  #hero-title {
    font-size: calc(1.35rem + 2px);
  }

  #home-title,
  #history-title,
  #tracker-title {
    font-size: calc(1.2rem + 2px);
  }

  .quick-stats,
  .activity-section-grid,
  .field-grid,
  .history-details,
  .gym-set-row,
  .baloot-total-box,
  .name-row,
  .custom-activity {
    grid-template-columns: 1fr;
  }

  .progress-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #activity-canvas,
  body::after {
    animation: none;
  }
}
