
.ui-routest { position: relative; box-sizing: border-box; height: 100%; min-height: 0; display: flex; flex-direction: column; container-type: inline-size; overflow: hidden; background: var(--ui-bg); color: var(--ui-fg); font: 15px/1.4 var(--ui-font); }
.ui-routest-in { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px max(12px, env(safe-area-inset-bottom)); }
.ui-routest-main { flex: none; display: grid; gap: 10px; }
.ui-routest-card {
  position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 2px 14px; min-height: 148px; padding: 14px 16px; border-radius: calc(var(--ui-radius) + 4px);
  background: var(--ui-accent); color: var(--ui-accent-fg); touch-action: pan-y; -webkit-touch-callout: none; user-select: none; will-change: transform; outline: none;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1);
}
.ui-routest-card:focus-visible { box-shadow: var(--ui-focus); }
.ui-routest-card[data-dragging] { transition: none; }
.ui-routest-arrow { grid-row: 1 / span 3; display: grid; place-items: center; width: 72px; height: 72px; }
.ui-routest-arrow svg { width: 64px; height: 64px; transition: transform .2s; }
.ui-routest-in-m { font-size: 34px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ui-routest-text { font-size: 19px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.ui-routest-count { font-size: 13px; opacity: .85; }
.ui-routest-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--ui-subtle); }
.ui-routest-fill { display: block; height: 100%; border-radius: inherit; background: var(--ui-accent); transition: width .3s; }
.ui-routest-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; text-align: center; }
.ui-routest-stats div { min-width: 0; }
.ui-routest-stats dt { color: var(--ui-muted); font-size: 12px; }
.ui-routest-stats dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ui-routest-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ui-routest-btn {
  box-sizing: border-box; min-height: 48px; padding: 0 14px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface); color: var(--ui-fg);
  font: 600 15px/1 var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ui-routest-btn:disabled { opacity: .45; cursor: default; }
.ui-routest-btn:focus-visible { outline: none; box-shadow: var(--ui-focus); }
.ui-routest-list { flex: 1; min-height: 0; margin: 0; padding: 0; overflow: auto; overscroll-behavior: contain; list-style: none; -webkit-overflow-scrolling: touch; }
.ui-routest-step {
  box-sizing: border-box; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--ui-border);
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ui-routest-step:focus-visible { outline: none; box-shadow: inset var(--ui-focus); }
.ui-routest-step svg { width: 22px; height: 22px; }
.ui-routest-step[data-state="done"] { color: var(--ui-muted); }
.ui-routest-step[aria-current="step"] { background: var(--ui-accent-soft); font-weight: 600; }
.ui-routest-far { color: var(--ui-muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-routest-empty { padding: 24px 12px; color: var(--ui-muted); text-align: center; }
/* With the room, the step stays large on one side and the list runs down the other. */
@container (min-width: 620px) {
  .ui-routest-in { flex-direction: row; align-items: stretch; gap: 20px; padding: 20px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .ui-routest-main { flex: 0 0 56%; align-content: start; }
  .ui-routest-card { grid-template-columns: 110px minmax(0, 1fr); min-height: 220px; padding: 20px 22px; }
  .ui-routest-arrow { width: 110px; height: 110px; }
  .ui-routest-arrow svg { width: 96px; height: 96px; }
  .ui-routest-in-m { font-size: 46px; }
  .ui-routest-text { font-size: 24px; }
}
@media (hover: hover) { .ui-routest-step:hover { background: var(--ui-subtle); } }
@media (prefers-reduced-motion: reduce) { .ui-routest-card, .ui-routest-arrow svg, .ui-routest-fill { transition: none; } }

