:root {
  --bg: #f6efe2;
  --bg-accent: #efe5d2;
  --card: #fffdf8;
  --border: #dfd3bd;
  --border-strong: #c9b796;
  --evergreen: #1d3f32;
  --evergreen-deep: #152f25;
  --pine: #2c6b4f;
  --cranberry: #be3a34;
  --cranberry-soft: #fae6e4;
  --gold: #d49b2d;
  --gold-deep: #9f6d0d;
  --gold-soft: #fcf2db;
  --cocoa: #6f462c;
  --cocoa-soft: #efe3d7;
  --ink: #27221d;
  --muted: #6c6257;
  --shadow: 0 2px 10px rgba(39, 34, 29, 0.06);
  --radius: 14px;
  --elf-col: 122px;
  --tick-w: 48px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body,
body.gc-body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  line-height: 1.35;
  background: radial-gradient(circle at top right, #fbf7ee 0%, var(--bg) 55%, var(--bg-accent) 100%);
  color: var(--ink);
  min-height: 100dvh;
}

/* Hide global webserver floating social bar so it never overlaps the fixed solver dock */
body.gc-body > .social {
  display: none !important;
}

.app-shell button {
  font-family: inherit;
  line-height: 1.2;
}

body.is-dragging {
  user-select: none;
  cursor: grabbing !important;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.modal-open .topbar,
body.modal-open .workspace,
body.modal-open .solver-dock {
  pointer-events: none;
  touch-action: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 12px 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Header */
.topbar {
  background: linear-gradient(135deg, var(--evergreen) 0%, var(--evergreen-deep) 100%);
  color: #fffdf8;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.brand h1 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.elf-role {
  font-size: 0.61rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #d7e5dc;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.diff-pills {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 2px;
}

.pill {
  border: 0;
  background: transparent;
  color: #dbe8e0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: background 0.15s, color 0.15s;
}

.pill-medal {
  font-size: 0.74rem;
  line-height: 1;
}

.pill-medal:empty {
  display: none;
}

.pill.active {
  background: var(--gold);
  color: #1f1708;
}

.daily-menu-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fffdf8;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.icon-btn.active {
  border-color: rgba(246, 213, 139, 0.7);
  background: rgba(212, 155, 45, 0.28);
  color: #fff8e3;
}

.daily-caret {
  font-size: 0.65rem;
  opacity: 0.85;
  margin-left: 1px;
  transition: transform 0.15s ease;
}

.daily-btn[aria-expanded="true"] .daily-caret {
  transform: rotate(180deg);
}

/* Daily Sprint Archive Popover */
.daily-archive-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 36;
  width: min(304px, calc(100vw - 24px));
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(18, 28, 22, 0.28);
  padding: 8px;
  text-align: left;
  animation: popSlideIn 0.14s ease-out;
}

.daily-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 6px 7px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--evergreen);
}

.daily-archive-sub {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.daily-archive-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
}

.daily-archive-empty {
  padding: 12px 8px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.daily-archive-item {
  width: 100%;
  border: 1px solid transparent;
  background: #faf5ea;
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
}

.daily-archive-item:hover {
  background: #f2e8d4;
  border-color: var(--border-strong);
}

.daily-archive-item.active {
  background: #ecf7f0;
  border-color: var(--pine);
  box-shadow: inset 0 0 0 1px rgba(44, 107, 79, 0.2);
}

.daily-archive-item-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.daily-archive-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--evergreen);
  white-space: nowrap;
}

.daily-archive-date {
  font-size: 0.73rem;
  color: var(--muted);
  white-space: nowrap;
}

.daily-archive-today-pill {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--gold-soft);
  color: var(--gold-deep);
  border: 1px solid #e5c171;
  padding: 1px 6px;
  border-radius: 999px;
}

.daily-archive-tiers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.daily-archive-tier-pill {
  min-width: 22px;
  height: 20px;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fffdf8;
  color: #968b7c;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.daily-archive-tier-pill.is-gold {
  background: var(--gold-soft);
  border-color: #dfae45;
  color: #7c5206;
  font-size: 0.72rem;
}

.daily-archive-tier-pill.is-silver {
  background: #e1f4ea;
  border-color: #7bbf9c;
  color: #16603e;
  font-size: 0.72rem;
}

/* Welcome Splash & Workshop Handbook Modal (?) */
.rules-backdrop {
  z-index: 44;
}

.rules-modal-card {
  width: min(690px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 44px rgba(18, 28, 22, 0.34);
  text-align: left;
  animation: popSlideIn 0.16s ease-out;
}

.rules-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.rules-eyebrow {
  display: inline-block;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pine);
  margin-bottom: 2px;
}

.rules-heading {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--evergreen);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.rules-heading-sub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid #e6c677;
  padding: 2px 8px;
  border-radius: 999px;
}

.rules-close {
  border: 1px solid var(--border);
  background: #faf5ea;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.rules-close:hover {
  background: #efe5d3;
  color: var(--ink);
}

.rules-objective-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3faf5 0%, #fdf6e4 100%);
  border: 1.5px solid #c9decb;
}

.objective-icon {
  font-size: 1.25rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.objective-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.42;
  color: var(--ink);
}

.objective-copy strong {
  color: var(--evergreen);
}

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

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #faf5ea;
  border: 1px solid #e8dcc7;
}

.rule-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fffdf8;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.rule-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  min-width: 0;
}

.rule-copy strong {
  color: var(--ink);
  font-size: 0.81rem;
}

.rule-copy b {
  color: var(--ink);
}

.rules-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.rules-tip {
  font-size: 0.74rem;
  color: var(--muted);
}

.rules-tip kbd {
  background: #f2eadb;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.69rem;
  font-family: inherit;
  font-weight: 700;
}

.rules-cta-btn {
  margin-left: auto;
}

.mob-only-badge {
  display: none;
}

@keyframes popSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quick Silver / Gold Celebration Splash & Confetti */
.win-splash {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 20, 15, 0.24);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.win-splash.fading {
  opacity: 0;
  pointer-events: none;
}

.win-confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.win-splash-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 196px;
  padding: 22px 30px 20px;
  border-radius: 22px;
  background: var(--card);
  border: 2.5px solid var(--pine);
  box-shadow: 0 20px 50px rgba(20, 16, 12, 0.34);
  text-align: center;
  animation: splashPopIn 0.32s cubic-bezier(0.22, 1.28, 0.36, 1);
}

.win-splash-card.tier-gold {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fffdf5 0%, #fff4d2 100%);
  box-shadow: 0 22px 56px rgba(180, 125, 18, 0.34), 0 0 0 4px rgba(242, 198, 84, 0.28);
}

.win-splash-card.tier-silver {
  border-color: var(--pine);
  background: linear-gradient(180deg, #fffdf9 0%, #eff8f3 100%);
}

.win-splash-popper {
  font-size: 2.85rem;
  line-height: 1;
  animation: popperWiggle 0.55s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.win-splash-title {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.win-splash-card.tier-gold .win-splash-title {
  color: #7c5100;
}

.win-splash-card.tier-silver .win-splash-title {
  color: var(--evergreen);
}

@keyframes splashPopIn {
  0% {
    opacity: 0;
    transform: scale(0.76) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popperWiggle {
  0% {
    transform: scale(0.55) rotate(-18deg);
  }
  55% {
    transform: scale(1.14) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .win-splash-card,
  .win-splash-popper {
    animation: none;
  }
}

/* Reset Board Confirmation Modal */
.reset-confirm-backdrop {
  z-index: 46;
}

.reset-confirm-card {
  width: min(320px, calc(100vw - 32px));
  background: var(--card);
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px 18px 15px;
  box-shadow: 0 18px 42px rgba(18, 28, 22, 0.34);
  text-align: center;
  animation: popSlideIn 0.14s ease-out;
}

.reset-confirm-card h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.reset-confirm-copy {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.38;
}

.reset-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.reset-confirm-actions .dock-btn {
  flex: 1;
}

.dock-btn.danger {
  background: var(--cranberry);
  border-color: #992924;
  color: #fff;
}

.dock-btn.danger:hover:not(:disabled) {
  background: #a42e29;
}

/* Solver Walkthrough Controls (docked cleanly in fixed bottom footer!) */
.dock-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  max-width: 960px;
  width: 100%;
}

.dock-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dock-sep {
  width: 1px;
  height: 22px;
  background: var(--border-strong);
  opacity: 0.7;
  flex-shrink: 0;
}

.dock-walkthrough {
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.walkthrough-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.83rem;
}

.walkthrough-step-pill {
  background: var(--evergreen);
  color: #fffdf8;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.walkthrough-step-pill.gold-done {
  background: var(--gold);
  color: #241802;
}

.walkthrough-desc {
  font-weight: 700;
  color: var(--ink);
}

.walkthrough-delta {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e9e1d2;
  color: var(--muted);
}

.walkthrough-delta.good {
  background: #daf3e5;
  color: #155c3a;
}

.walkthrough-delta.gold {
  background: #fde9a9;
  color: #704902;
}

.walkthrough-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.wt-btn {
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.wt-btn:hover:not(:disabled) {
  background: #f5ecdc;
}

.wt-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.wt-btn.accent {
  background: var(--evergreen);
  border-color: var(--evergreen);
  color: #fff;
}

/* Slower, ultra-legible glides during animated solver walkthrough */
.timeline-board.solver-animating .task-block {
  transition: left 480ms cubic-bezier(0.22, 0.85, 0.32, 1),
              width 480ms cubic-bezier(0.22, 0.85, 0.32, 1),
              transform 220ms ease,
              box-shadow 220ms ease,
              opacity 200ms ease;
}

.timeline-board.solver-animating .dry-ribbon {
  transition: left 480ms cubic-bezier(0.22, 0.85, 0.32, 1), width 480ms ease;
}

.task-block.solver-moving {
  z-index: 9;
  transform: translateY(-4px) scale(1.04);
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--gold), 0 8px 20px rgba(212, 155, 45, 0.45);
}

.task-block.solver-ghost-slot {
  opacity: 0.25;
  border: 2px dashed #fff;
}

.task-block.solver-landed {
  animation: solverLandPop 420ms ease-out;
}

@keyframes solverLandPop {
  0% { transform: scale(1.07); box-shadow: 0 0 0 4px var(--gold), 0 6px 18px rgba(212, 155, 45, 0.5); }
  100% { transform: scale(1); }
}

.solver-flyer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: none;
  border-radius: 9px;
  color: #fff;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  border: 2px solid #fff;
  box-shadow: 0 12px 30px rgba(24, 18, 10, 0.38), 0 0 0 3px rgba(212, 155, 45, 0.72);
  overflow: hidden;
  will-change: transform, width, height;
}

/* Workspace */
.workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Timeline Board */
.board-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.timeline-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 10px 12px 0;
}

.timeline-board {
  position: relative;
  min-width: max-content;
  padding-left: 10px;
}

.tick-header {
  display: flex;
  align-items: flex-end;
  margin-bottom: 6px;
}

.elf-col-spacer {
  position: sticky;
  left: 0;
  z-index: 12;
  background: var(--card);
  width: var(--active-elf-col, var(--elf-col));
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding-left: 6px;
}

.tick-track-head {
  position: relative;
  z-index: 1;
  display: flex;
  height: 28px;
}

.tick-num {
  width: var(--active-tick-w, var(--tick-w));
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding-left: 3px;
  border-left: 1px dashed rgba(155, 138, 111, 0.35);
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.tick-num.half-tick {
  opacity: 0.68;
  font-weight: 500;
  font-size: 0.66rem;
}

.tick-num.gold-tick {
  color: var(--gold-deep);
  font-weight: 800;
}

.tick-num.launch-tick {
  color: var(--cranberry);
  font-weight: 800;
}

.gold-flag,
.launch-flag {
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 6;
  pointer-events: none;
}

.gold-flag {
  background: var(--gold);
  color: #261a02;
  box-shadow: 0 2px 5px rgba(212, 155, 45, 0.35);
}

.launch-flag {
  background: var(--cranberry);
  color: #fff;
  box-shadow: 0 2px 5px rgba(190, 58, 52, 0.25);
}

.tick-track-head.flags-split .gold-flag {
  transform: translateX(-100%);
  margin-left: -2px;
}

.tick-track-head.flags-split .launch-flag {
  transform: translateX(0);
  margin-left: 2px;
}

.elf-rows {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dep-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
  overflow: visible;
}

.gold-guide-line {
  position: absolute;
  top: -2px;
  bottom: -4px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--gold) 0 5px,
    transparent 5px 10px
  );
  z-index: 4;
  pointer-events: none;
  opacity: 0.85;
}

.launch-guide-line {
  position: absolute;
  top: -2px;
  bottom: -4px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--cranberry) 0 6px,
    transparent 6px 11px
  );
  z-index: 4;
  pointer-events: none;
}

.elf-row {
  display: flex;
  align-items: stretch;
  min-height: 76px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fcfaf4;
  transition: border-color 0.14s, background 0.14s, opacity 0.14s, box-shadow 0.14s;
}

.elf-row.eligible {
  border-color: var(--pine);
  background: #f3fbf6;
}

.elf-row.eligible.specialty-match {
  border-color: var(--gold);
  background: #fffaf0;
}

.elf-row.drag-hover {
  border-color: var(--pine);
  background: #e7f6ee;
  box-shadow: 0 0 0 3px rgba(44, 107, 79, 0.22);
}

.elf-row.drag-hover.specialty-match {
  border-color: #c88918;
  background: #fff4da;
  box-shadow: 0 0 0 3px rgba(212, 155, 45, 0.34);
}

.elf-row.ineligible {
  opacity: 0.4;
}

.elf-row.hint-glow {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.28);
}

.elf-row.hint-glow .elf-label {
  background: #f0f9ff;
}

.elf-label {
  position: sticky;
  left: 0;
  z-index: 11;
  width: var(--active-elf-col, var(--elf-col));
  flex-shrink: 0;
  padding: 6px 8px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: #fcfaf4;
  border-radius: 10px 0 0 10px;
  box-shadow: 2px 0 6px rgba(39, 34, 29, 0.04);
  transition: background 0.14s;
}

.elf-row.eligible .elf-label {
  background: #f3fbf6;
}

.elf-row.eligible.specialty-match .elf-label {
  background: #fffaf0;
}

.elf-row.drag-hover .elf-label {
  background: #e7f6ee;
}

.elf-row.drag-hover.specialty-match .elf-label {
  background: #fff4da;
}

.elf-name-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-weight: 700;
  font-size: 0.83rem;
}

.elf-name-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.elf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.elf-load-bar {
  height: 4px;
  background: #ece3d3;
  border-radius: 999px;
  overflow: hidden;
}

.elf-load-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 160ms ease, background 160ms ease;
}

.elf-load-fill.spare {
  background: #3aa16f;
}

.elf-load-fill.full {
  background: #d99c2b;
}

.elf-load-fill.over {
  background: #d13d36;
}

.elf-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 1px;
}

.skill-tag {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 6px;
  background: #efe8da;
  color: #4f463c;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.skill-tag.spec {
  background: var(--gold-soft);
  color: #7c5206;
  border: 1px solid #e5c171;
}

.elf-track {
  position: relative;
  flex: 1;
  min-height: 74px;
  display: flex;
  align-items: center;
}

.tick-bg-layer {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}

.tick-bg-cell {
  width: var(--active-tick-w, var(--tick-w));
  height: 100%;
  flex-shrink: 0;
  border-left: 1px dashed rgba(155, 138, 111, 0.34);
}

.tick-bg-cell.half-tick {
  border-left-color: rgba(155, 138, 111, 0.16);
}

.tick-bg-cell.silver-band {
  background: rgba(212, 155, 45, 0.06);
}

.tick-bg-cell.overtime {
  background: rgba(190, 58, 52, 0.06);
}

.cocoa-layer,
.blocks-layer,
.gaps-layer {
  position: absolute;
  inset: 0;
}

.cocoa-layer,
.gaps-layer {
  pointer-events: none;
}

.cocoa-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--cocoa-soft),
    var(--cocoa-soft) 5px,
    #e4d2bf 5px,
    #e4d2bf 10px
  );
  border: 1.5px dashed #a47958;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  z-index: 2;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.cocoa-block.standup-block {
  background: repeating-linear-gradient(
    -45deg,
    #e5edf5,
    #e5edf5 5px,
    #d5e2ef 5px,
    #d5e2ef 10px
  );
  border-color: #5b7c99;
}

.cocoa-block.standup-block span {
  color: #2f5170;
}

.cocoa-block.compact-cocoa span {
  display: none;
}

.cocoa-block span {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cocoa);
  line-height: 1;
}

/* Wait-gap causality pill */
.gap-cue {
  position: absolute;
  top: 25px;
  height: 20px;
  border-radius: 6px;
  border: 1px dashed rgba(108, 98, 87, 0.55);
  background: rgba(255, 253, 248, 0.9);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  z-index: 2;
}

.assign-hint-pill {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--pine);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(29, 63, 50, 0.25);
}

.assign-hint-pill.spec {
  background: #b87a10;
}

/* Task Block on Timeline */
.task-block {
  position: absolute;
  top: 7px;
  bottom: 18px;
  border-radius: 9px;
  color: #fff;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  cursor: grab;
  touch-action: none;
  z-index: 3;
  border: 1.5px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 1px 3px rgba(30, 24, 18, 0.14);
  transition: left 160ms cubic-bezier(0.22, 0.85, 0.32, 1),
              width 160ms cubic-bezier(0.22, 0.85, 0.32, 1),
              transform 120ms ease,
              box-shadow 120ms ease,
              opacity 120ms ease;
  overflow: hidden;
  user-select: none;
}

.task-block:hover:not(.pinned-block) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

/* Pinned immovable anchor block */
.task-block.pinned-block {
  cursor: default;
  touch-action: auto;
  border: 1.5px solid rgba(25, 20, 15, 0.45);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0 5px,
    transparent 5px 10px
  );
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.task-block.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2.5px #1f1914, 0 3px 10px rgba(0, 0, 0, 0.22);
  z-index: 6;
}

.task-block.same-toy {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 3.5px var(--gold);
  z-index: 5;
}

.task-block.dim-other {
  opacity: 0.42;
}

.task-block.drag-preview {
  border: 2px dashed #fff;
  box-shadow: 0 0 0 3px rgba(29, 63, 50, 0.35), 0 6px 16px rgba(0, 0, 0, 0.22);
  opacity: 0.92;
  z-index: 7;
}

.task-block.overtime-block {
  box-shadow: 0 0 0 1.5px #fffdf8, 0 0 0 3.5px rgba(190, 58, 52, 0.72);
}

.task-block.cycle-block {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.18) 6px,
    transparent 6px,
    transparent 12px
  );
  outline: 2.5px solid #ff2e2e;
}

.task-block.hint-pulse {
  z-index: 8;
  border-color: #fff;
  animation: pulseGlow 1.05s ease-in-out infinite;
}

/* Mrs. Claus source badge & destination landing slot */
.hint-source-badge {
  position: absolute;
  top: -8px;
  z-index: 9;
  pointer-events: none;
  background: #0369a1;
  color: #fff;
  border: 1.5px solid #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(3, 105, 161, 0.38);
}

.hint-target-slot {
  position: absolute;
  top: 5px;
  bottom: 16px;
  z-index: 7;
  pointer-events: none;
  border-radius: 10px;
  border: 2.5px dashed #0284c7;
  background: rgba(14, 165, 233, 0.18);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.72), 0 0 0 3px rgba(14, 165, 233, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hintSlotPulse 1.15s ease-in-out infinite;
}

.hint-slot-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1.5px solid #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.61rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.36);
}

.hint-slot-ghost-icon {
  font-size: 0.84rem;
  font-weight: 800;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
}

@keyframes hintSlotPulse {
  0%, 100% {
    background: rgba(14, 165, 233, 0.15);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7), 0 0 0 2px rgba(14, 165, 233, 0.2);
  }
  50% {
    background: rgba(14, 165, 233, 0.27);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.9), 0 0 0 5px rgba(14, 165, 233, 0.38);
  }
}

.hint-move-arrow {
  animation: hintArrowFlow 0.75s linear infinite;
}

@keyframes hintArrowFlow {
  from { stroke-dashoffset: 28; }
  to { stroke-dashoffset: 0; }
}

.task-block.narrow {
  padding: 2px 1px;
  align-items: center;
  text-align: center;
}

.task-block.narrow .task-top {
  font-size: 0.74rem;
  justify-content: center;
  gap: 1px;
}

.task-block.narrow .narrow-pin {
  font-size: 0.56rem;
  line-height: 1;
}

.task-block.narrow .task-meta {
  font-size: 0.62rem;
  justify-content: center;
  gap: 1px;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2.5px #fff, 0 0 0 5.5px rgba(2, 132, 199, 0.72), 0 5px 14px rgba(2, 132, 199, 0.32);
  }
  50% {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 0 2.5px #fff, 0 0 0 8px rgba(14, 165, 233, 0.95), 0 8px 20px rgba(2, 132, 199, 0.48);
  }
}

.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
}

.task-title-trunc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
  opacity: 0.94;
  line-height: 1.1;
}

.spec-bolt {
  background: rgba(255, 241, 184, 0.3);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 800;
}

.pin-icon {
  font-size: 0.64rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  padding: 0 3px;
}

/* Drying ribbon along bottom edge */
.dry-ribbon {
  position: absolute;
  bottom: 2px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px dashed currentColor;
  background: rgba(255, 253, 248, 0.95);
  font-size: 0.56rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  transition: left 160ms cubic-bezier(0.22, 0.85, 0.32, 1), width 160ms ease;
}

/* Floating Drag Ghost */
.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  pointer-events: none;
  border-radius: 11px;
  padding: 7px 11px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(20, 16, 12, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -110%) rotate(-2deg);
  white-space: nowrap;
}

.ghost-badge {
  background: rgba(0, 0, 0, 0.28);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.ghost-badge.gold {
  background: #b87e0e;
}

.ghost-badge.good {
  background: #1c7c4e;
}

.ghost-badge.bad {
  background: #a82822;
}

.ghost-badge.warn {
  background: #b7750b;
}

/* Contextual Task Inspector (swaps into the fixed bottom dock when a block is selected) */
.dock-inspector {
  max-width: 960px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.dock-inspector-head {
  display: contents;
}

.inspector-summary {
  order: 1;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  min-width: 0;
  flex: 1 1 auto;
}

.inspector-summary > div {
  min-width: 0;
}

.inspector-summary strong,
.inspector-sub {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inspector-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}

.inspector-sub {
  font-size: 0.73rem;
  color: var(--muted);
}

.inspector-btns {
  order: 2;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  flex-shrink: 0;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.inspector-btns::-webkit-scrollbar {
  display: none;
}

.inspector-close-btn {
  order: 3;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #f5ecdc;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.inspector-close-btn:hover {
  background: #eadcc4;
  color: var(--ink);
}

.ctl-btn {
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: #faf5ea;
  color: var(--ink);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.ctl-btn:hover:not(:disabled) {
  background: #f1e7d3;
}

.ctl-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.ctl-btn.primary {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

.ctl-btn.spec {
  background: var(--gold-soft);
  border-color: #d9a441;
  color: #6b4400;
}

.ctl-btn.hint-cta {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #075985;
  color: #fff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.38);
}

.ctl-btn.hint-cta:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.ctl-btn.danger {
  background: var(--cranberry-soft);
  border-color: #e09994;
  color: #8f221d;
}

/* Compact Toy Strip & Backlog Tray */
.bench-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px 10px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.bench-card.drop-park-active {
  border-color: var(--gold);
  background: #fff9ec;
  box-shadow: 0 0 0 3px rgba(212, 155, 45, 0.25);
}

.bench-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.bench-header h2 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--evergreen);
}

.bench-tip {
  font-size: 0.72rem;
  color: var(--muted);
}

.toy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.toy-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fdfaf3;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.toy-pill:hover {
  border-color: var(--border-strong);
  background: #f7f0e2;
}

.toy-pill.toy-complete {
  background: #f4faf6;
  border-color: #b5dac5;
}

.toy-pill.toy-overtime {
  background: #fdf4f3;
  border-color: #e6b3af;
}

.toy-pill.toy-focused {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 155, 45, 0.28);
}

.toy-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.toy-finish-tag {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--muted);
}

.toy-finish-tag.gold {
  color: #8c5d06;
}

.toy-finish-tag.good {
  color: #1a6341;
}

.toy-finish-tag.over {
  color: var(--cranberry);
}

.backlog-tray {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.backlog-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 2px;
}

.step-chip {
  border: 1.5px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: grab;
  touch-action: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
}

.step-chip:hover:not(:disabled) {
  transform: translateY(-1px);
}

.step-chip.waiting-prereq {
  opacity: 0.44;
  border-style: dashed;
  background: #f5f0e5;
  color: var(--muted);
  cursor: not-allowed;
  touch-action: auto;
}

.step-chip.selected {
  border-color: #1f1914;
  box-shadow: 0 0 0 2px rgba(31, 25, 20, 0.2);
  background: #fff8e6;
}

.step-chip.hint-pulse {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35);
}

.dry-badge {
  font-size: 0.65rem;
  color: #2b6cb0;
  background: #e9f2fc;
  padding: 1px 4px;
  border-radius: 5px;
}

/* Bottom Solver Dock */
.solver-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 58px;
  background: rgba(255, 253, 248, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1.5px solid var(--border-strong);
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 24;
  box-shadow: 0 -4px 18px rgba(39, 34, 29, 0.1);
}

.solver-dock.walkthrough-mode {
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.98) 0%, rgba(249, 239, 216, 0.98) 100%);
  border-top-color: var(--gold);
}

.solver-dock.inspector-mode {
  background: rgba(255, 253, 248, 0.99);
  border-top-color: var(--evergreen);
}

.dock-btn {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
}

.dock-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.dock-btn:hover:not(:disabled) {
  filter: brightness(0.97);
}

.dock-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.dock-btn.secondary {
  background: var(--card);
  color: var(--ink);
}

.dock-btn.subtle {
  background: #f2eadb;
  color: var(--muted);
  border-color: var(--border);
}

.dock-btn.launch {
  background: linear-gradient(135deg, #277853 0%, #1c5a3e 100%);
  border-color: #174c34;
  color: #fff;
  box-shadow: 0 3px 10px rgba(28, 90, 62, 0.32);
}

/* Modal Backdrop (Welcome Splash & Handbook) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(21, 47, 37, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 40;
  overscroll-behavior: contain;
  touch-action: none;
}

@media (max-width: 640px) {
  :root {
    --elf-col: 0px;
    --tick-w: 28px;
  }

  .hide-mobile {
    display: none !important;
  }

  .mob-only-badge {
    display: inline;
    margin-right: 1px;
    font-size: 0.6rem;
  }

  .app-shell {
    padding: 6px 6px calc(88px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  /* Compact 2-line mobile header */
  .topbar {
    padding: 7px 10px;
    gap: 5px;
    border-radius: 12px;
    border-bottom-width: 2px;
  }

  .brand-badge {
    display: none;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand > div {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .brand h1 {
    font-size: 0.94rem;
    flex-shrink: 0;
  }

  .subtitle {
    font-size: 0.68rem;
    margin: 0;
    min-width: 0;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-controls {
    width: 100%;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .diff-pills {
    margin-right: auto;
  }

  .pill {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .icon-btn {
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .workspace {
    gap: 6px;
  }

  /* Gantt board front-and-center: stacked elf headers & auto-fitted timeline */
  .timeline-scroll {
    padding: 8px 6px;
  }

  .timeline-board {
    padding-left: 0;
  }

  .tick-header {
    margin-bottom: 4px;
  }

  .elf-col-spacer {
    display: none;
  }

  .tick-track-head {
    height: 22px;
    margin-left: 1.5px;
  }

  .tick-num {
    font-size: 0.62rem;
    padding-left: 2px;
  }

  .gold-flag,
  .launch-flag {
    font-size: 0.58rem;
    padding: 1px 4px;
  }

  .elf-rows {
    gap: 6px;
  }

  .elf-row {
    flex-direction: column;
    min-height: 0;
    border-radius: 9px;
  }

  .elf-track {
    min-height: 44px;
    flex: none;
  }

  .elf-label {
    position: sticky;
    left: 0;
    z-index: 5;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 3px 7px;
    gap: 7px;
    border-right: 0;
    border-bottom: 1px solid rgba(201, 183, 150, 0.45);
    border-radius: 7px 7px 0 0;
    box-shadow: none;
  }

  .elf-role,
  .elf-load-bar {
    display: none;
  }

  .elf-name-line {
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .elf-name-left {
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .elf-dot {
    width: 6px;
    height: 6px;
  }

  .elf-skills {
    gap: 3px;
    margin-top: 0;
    flex-wrap: nowrap;
  }

  .skill-tag,
  .skill-tag.spec {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.64rem;
    line-height: 1;
  }

  .cocoa-block {
    top: 3px;
    bottom: 3px;
    font-size: 0.76rem;
  }

  .cocoa-block span {
    display: none;
  }

  .task-block {
    top: 4px;
    bottom: 11px;
    border-radius: 6px;
    border-width: 1.5px;
    padding: 1px 3px;
  }

  .task-block:not(.narrow) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .task-block:not(.narrow) .task-top {
    width: 100%;
    font-size: 0.67rem;
    gap: 2px;
  }

  .task-block:not(.narrow) .task-title-trunc {
    letter-spacing: -0.03em;
  }

  .task-block:not(.narrow) .task-dur {
    font-size: 0.6rem;
    flex-shrink: 0;
    opacity: 0.95;
  }

  .task-block:not(.narrow) .task-meta {
    display: none;
  }

  .task-block.narrow {
    padding: 1px 0;
    gap: 0;
  }

  .task-block.narrow .task-top {
    font-size: 0.65rem;
    line-height: 1;
  }

  .task-block.narrow .task-meta {
    font-size: 0.54rem;
    line-height: 1;
  }

  .dry-ribbon {
    bottom: 1px;
    height: 10px;
    font-size: 0.48rem;
  }

  .hint-target-slot {
    top: 3px;
    bottom: 10px;
  }

  /* Contextual task inspector inside the bottom dock on mobile */
  .dock-inspector {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .dock-inspector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .inspector-summary {
    order: 0;
    margin-right: 0;
    font-size: 0.77rem;
    gap: 6px;
  }

  .inspector-sub {
    font-size: 0.68rem;
  }

  .inspector-btns {
    order: 0;
    width: 100%;
    gap: 5px;
  }

  .inspector-close-btn {
    order: 0;
    width: 26px;
    height: 26px;
    font-size: 0.76rem;
  }

  .ctl-btn {
    padding: 5px 9px;
    font-size: 0.73rem;
  }

  .bench-card {
    padding: 7px 9px 8px;
    border-radius: 12px;
  }

  .bench-header {
    margin-bottom: 5px;
  }

  .bench-header h2 {
    font-size: 0.78rem;
  }

  .bench-tip {
    display: none;
  }

  .toy-list {
    gap: 5px;
  }

  .toy-pill {
    padding: 4px 8px;
    font-size: 0.72rem;
    gap: 5px;
  }

  .toy-finish-tag {
    font-size: 0.67rem;
  }

  .backlog-tray {
    margin-top: 7px;
    padding-top: 6px;
    gap: 5px;
  }

  .step-chip {
    padding: 4px 7px;
    font-size: 0.7rem;
    border-radius: 7px;
  }

  /* Bottom dock: compact Reset + Mrs. Claus / Ganttalf */
  .solver-dock {
    min-height: 50px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  }

  .dock-row {
    gap: 6px;
  }

  .dock-group {
    gap: 4px;
    flex-shrink: 0;
  }

  .dock-help-group {
    flex: 1;
    min-width: 0;
    gap: 5px;
  }

  .dock-btn {
    padding: 8px 6px;
    font-size: 0.73rem;
    text-align: center;
  }

  .dock-btn.icon-only-mobile {
    min-width: 32px;
    padding: 8px 8px;
    font-size: 0.82rem;
  }

  .dock-help-group .dock-btn {
    flex: 1;
    min-width: 0;
  }

  .walkthrough-info {
    font-size: 0.74rem;
    gap: 5px;
  }

  .wt-btn {
    padding: 4px 8px;
    font-size: 0.71rem;
  }

  /* Splash modal on phones */
  .rules-modal-card {
    padding: 14px 13px 13px;
  }

  .rules-heading {
    font-size: 1.06rem;
  }

  .objective-copy {
    font-size: 0.79rem;
  }

  .rules-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .rule-item {
    padding: 6px 8px;
  }

  .rules-tip {
    display: none;
  }

  .rules-cta-btn {
    width: 100%;
  }
}
