:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --bg-deep: #e8ddcc;
  --ink: #1e1c18;
  --muted: #5d5346;
  --accent: #c1542b;
  --accent-soft: #e3b59d;
  --panel: #fff8ef;
  --stroke: #dccdbb;
  --success: #2f6b4f;
  --shadow: 0 20px 50px rgba(39, 29, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #f9dcc5 0%, transparent 50%),
    radial-gradient(circle at 20% 20%, #f8f2e7 0%, transparent 55%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 84, 43, 0.25), transparent 70%);
  filter: blur(2px);
  z-index: 0;
}

body::before {
  top: -80px;
  left: -60px;
}

body::after {
  bottom: -90px;
  right: -40px;
}

[data-share-status]:empty {
  display: none;
}

[data-run-fields] [data-run-name] {
  display: none;
}

[data-run-fields][data-renaming="true"] {
  grid-template-columns: minmax(200px, 1fr);
}

[data-run-fields][data-renaming="true"] [data-run-select],
[data-run-fields][data-renaming="true"] [data-rename-button] {
  display: none;
}

[data-run-fields][data-renaming="true"] [data-run-name] {
  display: flex;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
}

.top-4 {
  top: 16px;
}

.z-10 {
  z-index: 10;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: 6px;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-5 {
  gap: 20px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

.max-w-screen-lg {
  max-width: 980px;
}

.w-full {
  width: 100%;
}

.min-w-10 {
  min-width: 40px;
}

.h-10 {
  height: 40px;
}

.min-h-10 {
  min-height: 40px;
}

.min-h-5 {
  min-height: 1.1rem;
}

.p-2 {
  padding: 8px;
}

.p-3 {
  padding: 12px;
}

.p-5 {
  padding: 20px;
}

.p-6 {
  padding: 24px;
}

.px-6 {
  padding-left: 24px;
  padding-right: 24px;
}

.px-2-5 {
  padding-left: 10px;
  padding-right: 10px;
}

.py-12 {
  padding-top: 48px;
  padding-bottom: 48px;
}

.py-2 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.pb-4 {
  padding-bottom: 16px;
}

.mb-1 {
  margin-bottom: 6px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.m-0 {
  margin: 0;
}

.block {
  display: block;
}

.text-xs {
  font-size: 0.7rem;
}

.text-sm {
  font-size: 0.9rem;
}

.text-base {
  font-size: 0.95rem;
}

.text-lg {
  font-size: 1.05rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.3rem;
}

.text-3xl {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
}

.leading-tight {
  line-height: 1.08;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-widest {
  letter-spacing: 0.18em;
}

.tracking-wide {
  letter-spacing: 0.12em;
}

.tracking-tight {
  letter-spacing: 0.02em;
}

.tracking-normal {
  letter-spacing: 0.01em;
}

.text-muted {
  color: var(--muted);
}

.text-accent {
  color: var(--accent);
}

.text-success {
  color: var(--success);
}

.text-white {
  color: #fff;
}

.bg-panel {
  background: var(--panel);
}

.bg-surface {
  background: #fff;
}

.bg-input {
  background: #fdfbf7;
}

.bg-distance {
  background: #fffaf3;
}

.bg-accent {
  background: var(--accent);
}

.bg-transparent {
  background: transparent;
}

.bg-soft {
  background: #f7eee6;
}

.border {
  border: 1px solid var(--stroke);
}

.border-b {
  border-bottom: 1px solid var(--stroke);
}

.border-stroke {
  border-color: var(--stroke);
}

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

.border-transparent {
  border-color: transparent;
}

.border-dashed {
  border-style: dashed;
}

.rounded-lg {
  border-radius: 12px;
}

.rounded-xl {
  border-radius: 16px;
}

.rounded-2xl {
  border-radius: 20px;
}

.rounded-full {
  border-radius: 999px;
}

.shadow-panel {
  box-shadow: var(--shadow);
}

.shadow-accent {
  box-shadow: 0 8px 18px rgba(193, 84, 43, 0.2);
}

.shadow-drag {
  box-shadow: 0 12px 24px rgba(39, 29, 18, 0.12);
}

.shadow-drop-before {
  box-shadow: inset 0 3px 0 rgba(193, 84, 43, 0.7);
}

.shadow-drop-after {
  box-shadow: inset 0 -3px 0 rgba(193, 84, 43, 0.7);
}

.transition {
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.hover-raise:hover {
  transform: translateY(-1px);
}

.hover-shadow:hover {
  box-shadow: 0 8px 18px rgba(193, 84, 43, 0.2);
}

.focus-ring:focus-visible {
  outline: 3px solid rgba(193, 84, 43, 0.35);
  outline-offset: 2px;
}

.cursor-grab {
  cursor: grab;
}

.active-grabbing:active {
  cursor: grabbing;
}

.font-inherit {
  font-family: inherit;
}

.opacity-60 {
  opacity: 0.6;
}

.grid-cols-hero {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-cols-summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.grid-cols-run-controls {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.grid-cols-run-fields {
  grid-template-columns: minmax(200px, 1fr) auto;
}

.grid-cols-intervals {
  grid-template-columns: auto minmax(120px, 1fr) repeat(3, minmax(130px, 1fr)) auto;
}

.animate-rise {
  animation: rise 700ms ease both;
}

.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .top-4 {
    top: 12px;
  }

  .grid-cols-intervals {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .px-6 {
    padding-left: 18px;
    padding-right: 18px;
  }

  .py-12 {
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .grid-cols-run-controls {
    grid-template-columns: 1fr;
  }

  .grid-cols-run-fields {
    grid-template-columns: 1fr;
  }

  .grid-cols-intervals {
    grid-template-columns: 1fr;
  }
}
