:root {
  color: #f6f8ff;
  background: #090c12;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 85% -15%, rgb(90 72 155 / 30%), transparent 36rem),
    radial-gradient(circle at 5% 0%, rgb(33 100 139 / 23%), transparent 32rem),
    #090c12;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid #e2c55e;
  outline-offset: 3px;
}

.game-shell {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 3vw, 3rem) 2rem;
}

.topbar,
.planning-header,
.backlog-panel,
.team-panel,
.planning-footer {
  border: 1px solid #293247;
  background: rgb(18 24 36 / 91%);
  box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 19%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1rem;
  padding: 0.8rem 1rem;
}

.brand,
.topbar__stats,
.vital-stat > div:first-child,
.panel-heading,
.employee-lane__header,
.task-card__topline,
.task-card__footer,
.planning-rules,
.planning-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid #8095d8;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, #263b6d, #151c32);
  color: #e5edff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0;
  color: #95a9db;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  letter-spacing: -0.035em;
}

.topbar__stats {
  gap: 0.75rem;
}

.sprint-stat,
.vital-stat {
  min-width: 4.2rem;
  color: #aeb9d2;
  font-size: 0.7rem;
}

.sprint-stat span,
.vital-stat span {
  display: block;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sprint-stat strong,
.vital-stat strong {
  color: #f7f9ff;
  font-size: 1rem;
}

.vital-stat {
  width: 7.2rem;
}

.vital-stat > div:first-child {
  justify-content: space-between;
}

.vital-meter,
.capacity-meter {
  overflow: hidden;
  height: 0.35rem;
  border-radius: 100vmax;
  background: #080b11;
}

.vital-meter span,
.capacity-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 250ms ease;
}

.reputation-stat .vital-meter span {
  background: #6de1a2;
}

.stress-stat .vital-meter span {
  background: #e46f82;
}

.planning-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  border-radius: 1rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
}

.planning-header p:not(.eyebrow) {
  max-width: 48rem;
  margin-bottom: 0;
  color: #aeb9d2;
  line-height: 1.5;
}

.planning-rules {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.planning-rules span,
.backlog-count,
.assigned-count {
  border: 1px solid #3a4561;
  border-radius: 100vmax;
  padding: 0.4rem 0.55rem;
  color: #b6c2de;
  font-size: 0.72rem;
  white-space: nowrap;
}

.planning-rules strong {
  color: #f9fbff;
}

.live-message {
  min-height: 2.85rem;
  margin: 0.8rem 0;
  border-left: 3px solid #e2c55e;
  border-radius: 0.4rem;
  background: rgb(226 197 94 / 8%);
  padding: 0.7rem 0.85rem;
  color: #dce3f5;
  font-size: 0.88rem;
  line-height: 1.45;
}

.game-board {
  display: grid;
  grid-template-columns: minmax(17rem, 0.78fr) minmax(0, 2.2fr);
  gap: 1rem;
}

.backlog-panel,
.team-panel {
  border-radius: 1rem;
  padding: 1rem;
}

.panel-heading {
  justify-content: space-between;
  gap: 0.7rem;
}

.panel-heading h2 {
  margin: 0.2rem 0 0;
}

.backlog-help {
  margin: 0.75rem 0 1rem;
  color: #909bb6;
  font-size: 0.79rem;
  line-height: 1.4;
}

.team-pick-button {
  display: grid;
  width: 100%;
  gap: 0.18rem;
  margin: 0 0 0.8rem;
  border: 1px solid #6f83ba;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, rgb(75 99 158 / 34%), rgb(26 35 55 / 92%));
  padding: 0.62rem 0.7rem;
  color: #eef3ff;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.team-pick-button:hover:not(:disabled) {
  border-color: #a8baff;
  box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 20%);
  transform: translateY(-1px);
}

.team-pick-button strong {
  font-size: 0.78rem;
}

.team-pick-button span {
  color: #aebbd9;
  font-size: 0.65rem;
}

.team-pick-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.backlog-cards {
  display: grid;
  gap: 0.65rem;
}

.task-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: clamp(4.7rem, calc(3.8rem + var(--task-points) * 0.42rem), 7.15rem);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #3b4864;
  border-left: 0.3rem solid var(--role-color);
  border-radius: 0.6rem;
  background: #161d2c;
  padding: 0.65rem 0.7rem;
  color: #f3f6ff;
  cursor: grab;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.task-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent, color-mix(in srgb, var(--role-color) 12%, transparent));
  content: "";
  pointer-events: none;
}

.task-card:hover,
.task-card.is-selected {
  border-color: var(--role-color);
  box-shadow: 0 0 0 1px var(--role-color), 0 0.5rem 1.2rem rgb(0 0 0 / 22%);
  transform: translateY(-2px);
}

.task-card.is-selected {
  outline: 2px solid #e2c55e;
  outline-offset: 2px;
}

.task-card.is-critical {
  background: linear-gradient(110deg, #211a29, #171b2a 55%);
}

.task-card__topline,
.task-card__footer {
  position: relative;
  justify-content: space-between;
  gap: 0.5rem;
  color: #b9c4dc;
  font-size: 0.69rem;
}

.task-card__topline strong {
  color: #f5f7ff;
}

.task-card__title {
  position: relative;
  margin: 0.45rem 0;
  font-size: 0.87rem;
  font-weight: 800;
  line-height: 1.23;
}

.role-chip {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--role-color, #95a9db) 20%, transparent);
  color: var(--role-color, #b9c7ef);
  padding: 0.16rem 0.28rem;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.task-expiry {
  color: #ffb3bb;
  font-weight: 800;
}

.team-panel {
  min-width: 0;
}

.team-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(10.5rem, 1fr));
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.9rem 0.1rem 0.15rem;
}

.employee-lane {
  display: flex;
  min-height: 29rem;
  flex-direction: column;
  border: 1px solid #36425e;
  border-top: 0.25rem solid var(--role-color);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgb(30 39 58 / 92%), #121823);
  padding: 0.7rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.employee-lane:has(.assign-button:enabled):hover {
  border-color: var(--role-color);
}

.employee-lane[data-click-assignment="valid"] {
  cursor: pointer;
}

.employee-lane[data-click-assignment="invalid"] {
  cursor: not-allowed;
}

[data-drag-role="FE"]:not([data-drag-over]) .employee-lane[data-employee-role="FE"]:not(.is-resting),
[data-drag-role="BE"]:not([data-drag-over]) .employee-lane[data-employee-role="BE"]:not(.is-resting),
[data-drag-role="QA"]:not([data-drag-over]) .employee-lane[data-employee-role="QA"]:not(.is-resting),
[data-drag-role="OPS"]:not([data-drag-over]) .employee-lane[data-employee-role="OPS"]:not(.is-resting),
[data-drag-role="AQA"]:not([data-drag-over]) .employee-lane[data-employee-role="AQA"]:not(.is-resting),
[data-selected-role="FE"]:not([data-drag-role]) .employee-lane[data-employee-role="FE"]:not(.is-resting),
[data-selected-role="BE"]:not([data-drag-role]) .employee-lane[data-employee-role="BE"]:not(.is-resting),
[data-selected-role="QA"]:not([data-drag-role]) .employee-lane[data-employee-role="QA"]:not(.is-resting),
[data-selected-role="OPS"]:not([data-drag-role]) .employee-lane[data-employee-role="OPS"]:not(.is-resting),
[data-selected-role="AQA"]:not([data-drag-role]) .employee-lane[data-employee-role="AQA"]:not(.is-resting) {
  border-color: color-mix(in srgb, var(--role-color) 92%, white);
  box-shadow:
    0 0 0 0.22rem color-mix(in srgb, var(--role-color) 72%, transparent),
    0 0.7rem 1.6rem color-mix(in srgb, var(--role-color) 24%, transparent);
  transform: translateY(-0.12rem);
}

.employee-lane.is-drag-preview {
  border-color: var(--preview-role-color);
  box-shadow:
    inset 0 0 0 100vmax color-mix(in srgb, var(--preview-role-color) 10%, transparent),
    0 0 0 1px color-mix(in srgb, var(--preview-role-color) 75%, transparent),
    0 0.8rem 1.8rem rgb(0 0 0 / 28%);
  transform: translateY(-0.2rem);
}

.employee-lane.is-drag-preview.is-drop-valid:hover {
  border-color: var(--preview-role-color);
}

.employee-lane.is-drop-invalid {
  border-color: #ff7182;
  box-shadow:
    inset 0 0 0 100vmax color-mix(in srgb, var(--preview-role-color) 8%, transparent),
    0 0 0 2px rgb(255 113 130 / 70%),
    0 0.8rem 1.8rem rgb(0 0 0 / 28%);
}

.employee-lane.is-drag-preview.is-drop-invalid:hover {
  border-color: #ff7182;
}

.employee-lane.is-resting {
  border-color: #a65d69;
  background: linear-gradient(180deg, rgb(54 34 44 / 94%), #17151e);
}

.employee-lane__header {
  justify-content: space-between;
  gap: 0.4rem;
}

.employee-lane h2 {
  margin: 0.38rem 0 0;
  font-size: 0.9rem;
}

.capacity-number {
  color: #f7f9ff;
  font-size: 1.15rem;
}

.capacity-number span {
  color: #8290ad;
  font-size: 0.7rem;
}

.member-stress,
.worker-stress {
  margin-top: 0.65rem;
}

.member-stress > div:first-child,
.worker-stress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: #9da9c3;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.member-stress__meter,
.worker-stress__meter {
  height: 0.28rem;
  margin-top: 0.22rem;
  overflow: hidden;
  border-radius: 100vmax;
  background: #080b11;
}

.member-stress__meter span,
.worker-stress__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #75e0ab;
  transition: width 220ms ease;
}

.member-stress.is-warning .member-stress__meter span,
.worker-stress.is-warning .worker-stress__meter span {
  background: #f0b65c;
}

.member-stress.is-critical .member-stress__meter span,
.worker-stress.is-critical .worker-stress__meter span {
  background: #ff7182;
}

.stress-bubble {
  position: relative;
  margin: 0.55rem 0 0;
  border: 1px solid #a96774;
  border-radius: 0.65rem 0.65rem 0.65rem 0;
  background: #30202a;
  padding: 0.5rem;
  color: #ffc0c8;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.35;
}

.capacity-meter {
  position: relative;
  margin: 0.7rem 0 0.3rem;
}

.capacity-meter__used {
  background: var(--role-color);
}

.capacity-meter__preview {
  position: absolute;
  inset-block: 0;
  left: var(--preview-start, 0%);
  width: var(--preview-width, 0%);
  background: var(--preview-role-color, var(--role-color));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 45%);
  opacity: 0;
  transition: left 180ms ease, width 180ms ease, opacity 120ms ease;
}

.employee-lane.is-drag-preview .capacity-meter__preview {
  opacity: 1;
}

.employee-lane.is-drop-invalid .capacity-meter__preview {
  box-shadow: inset 0 0 0 2px #ff7182;
}

.capacity-preview {
  min-height: 1.1rem;
  margin: 0 0 0.35rem;
  color: var(--preview-role-color, #aeb9d2);
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(-0.15rem);
  transition: color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.employee-lane.is-drag-preview .capacity-preview {
  opacity: 1;
  transform: translateY(0);
}

.employee-lane.is-drop-invalid .capacity-preview {
  color: #ff9aa6;
}

.assignment-list {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 13rem;
  flex: 1;
}

.empty-lane {
  margin: 0;
  border: 1px dashed #4a5875;
  border-radius: 0.5rem;
  padding: 0.8rem 0.5rem;
  color: #8190ad;
  font-size: 0.75rem;
  text-align: center;
}

.assigned-task {
  display: grid;
  gap: 0.45rem;
  border-left: 0.25rem solid var(--role-color);
  border-radius: 0.35rem;
  background: #0c111a;
  padding: 0.55rem;
}

.assigned-task.is-auto-placed {
  animation: auto-place 240ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.assigned-task__meta {
  display: block;
  margin-bottom: 0.22rem;
  color: #9ca9c4;
  font-size: 0.63rem;
}

.assigned-task strong {
  display: block;
  font-size: 0.75rem;
  line-height: 1.25;
}

.undo-button,
.assign-button,
.start-sprint-button {
  border: 0;
  border-radius: 0.45rem;
  cursor: pointer;
  font-weight: 800;
}

.undo-button {
  width: 100%;
  background: #263149;
  padding: 0.38rem;
  color: #dce5f8;
  font-size: 0.65rem;
}

.assign-button {
  min-height: 2.6rem;
  border: 1px solid color-mix(in srgb, var(--role-color) 55%, #44506b);
  background: color-mix(in srgb, var(--role-color) 14%, #1a2233);
  padding: 0.45rem;
  color: #f2f5ff;
  font-size: 0.68rem;
  line-height: 1.2;
}

.assign-button:disabled,
.undo-button:disabled,
.task-card:disabled,
.start-sprint-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.planning-footer {
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
}

.planning-footer p {
  margin: 0;
  color: #aeb9d2;
  font-size: 0.82rem;
}

.start-sprint-button {
  background: linear-gradient(135deg, #d5bb58, #f2dc82);
  padding: 0.7rem 0.9rem;
  color: #172031;
  white-space: nowrap;
}

.start-sprint-button span {
  margin-left: 0.35rem;
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .topbar,
  .planning-header,
  .planning-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar__stats,
  .planning-rules {
    justify-content: flex-start;
  }

  .game-board {
    grid-template-columns: 1fr;
  }

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

  .task-card {
    min-height: 6rem;
  }
}

@media (max-width: 560px) {
  .game-shell {
    padding: 0.7rem;
  }

  .topbar__stats {
    width: 100%;
    justify-content: space-between;
  }

  .vital-stat {
    width: 30%;
  }

  .backlog-cards {
    grid-template-columns: 1fr;
  }

  .planning-footer {
    align-items: stretch;
  }
}

.simulation-shell {
  position: relative;
  min-height: 100vh;
}

.simulation-topbar,
.day-dashboard,
.simulation-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #293247;
  border-radius: 1rem;
  background: rgb(18 24 36 / 94%);
  padding: 0.85rem 1rem;
}

.simulation-vitals {
  display: flex;
  gap: 0.55rem;
}

.simulation-vitals span {
  border: 1px solid #36425b;
  border-radius: 0.45rem;
  padding: 0.45rem 0.6rem;
  color: #9eabc7;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.simulation-vitals strong {
  display: block;
  margin-top: 0.1rem;
  color: #f5f7ff;
  font-size: 0.82rem;
}

.day-dashboard {
  margin-top: 1rem;
}

.day-dashboard h2 {
  margin: 0.2rem 0 0;
  font-size: 1.7rem;
}

.day-dashboard h2 span {
  color: #7785a3;
  font-size: 0.85rem;
}

.day-track {
  overflow: hidden;
  width: min(40rem, 55%);
  height: 0.65rem;
  border-radius: 100vmax;
  background: #080b11;
}

.day-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5a89e7, #75e0ab);
  transition: width 450ms ease;
}

.simulation-state {
  color: #75e0ab;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.simulation-message {
  min-height: 2.75rem;
  margin: 0.8rem 0;
  border-left: 3px solid #7ca1ff;
  border-radius: 0.4rem;
  background: rgb(92 126 210 / 10%);
  padding: 0.7rem 0.85rem;
  color: #dce4f5;
  font-size: 0.86rem;
}

.simulation-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(11rem, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
}

.worker-column {
  min-height: 31rem;
  border: 1px solid #34405a;
  border-top: 0.25rem solid var(--role-color);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #171f2f, #0e131d);
  padding: 0.7rem;
}

.worker-column.is-away {
  border-color: #e9818f;
  background: linear-gradient(180deg, #291d29, #12131c);
}

.worker-column.is-resting {
  border-color: #a65d69;
  background: linear-gradient(180deg, #2d2029, #15131b);
}

.worker-column > header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.worker-column > header div,
.worker-column > header span {
  display: block;
}

.worker-column > header div span {
  margin-top: 0.15rem;
  color: #8996b2;
  font-size: 0.64rem;
}

.worker-avatar {
  display: grid !important;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--role-color);
  border-radius: 50%;
  background: color-mix(in srgb, var(--role-color) 15%, #111724);
  color: var(--role-color);
  font-size: 0.62rem;
  font-weight: 900;
}

.day-off-bubble {
  position: relative;
  margin: 0.8rem 0 0;
  border: 1px solid #bd6674;
  border-radius: 0.7rem 0.7rem 0.7rem 0;
  background: #3a2029;
  padding: 0.55rem;
  color: #ffbcc4;
  font-size: 0.7rem;
  font-weight: 700;
}

.work-queue {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.work-card {
  position: relative;
  min-height: 6.5rem;
  overflow: hidden;
  border: 1px solid #3b4864;
  border-left: 0.28rem solid var(--role-color);
  border-radius: 0.55rem;
  background: #141b29;
}

.work-card.is-active {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--role-color) 60%, transparent);
}

.work-card.is-paused {
  border-color: #df7180;
  animation: paused-pulse 1.3s ease-in-out infinite;
}

.work-card.is-urgent {
  border-color: #ef6675;
}

.work-card__fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(0deg, rgb(67 181 125 / 48%), rgb(84 192 142 / 18%));
  transition: height 480ms ease;
}

.work-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 6.5rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.65rem;
}

.work-card__meta,
.work-card__progress {
  color: #93a1bd;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.work-card__content strong {
  font-size: 0.78rem;
  line-height: 1.25;
}

.work-card.is-complete .work-card__progress {
  color: #7be3ac;
}

.work-card.is-paused .work-card__progress {
  color: #ffabb6;
}

.simulation-empty {
  border: 1px dashed #3d4860;
  border-radius: 0.5rem;
  padding: 0.8rem;
  color: #7886a3;
  font-size: 0.72rem;
  text-align: center;
}

.simulation-controls {
  margin-top: 1rem;
}

.simulation-controls div span,
.simulation-controls div strong {
  display: block;
}

.simulation-controls div span {
  color: #8e9ab5;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.playback-button {
  border: 1px solid #5773b0;
  border-radius: 0.45rem;
  background: #202f50;
  padding: 0.65rem 0.85rem;
  color: #e6edff;
  cursor: pointer;
  font-weight: 800;
}

.complete-label {
  color: #75e0ab;
}

.urgent-overlay {
  position: fixed;
  z-index: 20;
  display: grid;
  inset: 0;
  place-items: center;
  background: rgb(4 6 10 / 78%);
  padding: 1rem;
  backdrop-filter: blur(5px);
}

.urgent-dialog {
  width: min(100%, 46rem);
  border: 1px solid #a54250;
  border-radius: 1rem;
  background: linear-gradient(150deg, #291821, #121722 62%);
  box-shadow: 0 2rem 6rem #000;
  padding: clamp(1.2rem, 4vw, 2rem);
}

.urgent-kicker {
  margin: 0;
  color: #ff7d8d;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.urgent-dialog h2 {
  margin: 0.25rem 0 1rem;
  color: #ffb3bd;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.urgent-task-summary {
  border-left: 0.3rem solid var(--role-color);
  border-radius: 0.4rem;
  background: #0d121c;
  padding: 0.75rem;
}

.urgent-task-summary span,
.urgent-task-summary strong {
  display: block;
}

.urgent-task-summary span {
  color: #9ba8c3;
  font-size: 0.68rem;
}

.urgent-task-summary strong {
  margin-top: 0.25rem;
}

.urgent-dialog > p:not(.urgent-kicker) {
  color: #abb7ce;
  font-size: 0.82rem;
}

.urgent-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.urgent-choices button {
  border: 1px solid #46536e;
  border-radius: 0.5rem;
  background: #1a2231;
  padding: 0.7rem 0.4rem;
  color: #edf1fb;
  cursor: pointer;
}

.urgent-choices button span,
.urgent-choices button strong,
.urgent-choices button small {
  display: block;
}

.urgent-choices button span,
.urgent-choices button small {
  color: #93a0ba;
  font-size: 0.62rem;
}

.urgent-choices button strong {
  margin: 0.25rem 0;
  font-size: 0.73rem;
}

@keyframes paused-pulse {
  50% { opacity: 0.65; }
}

@media (max-width: 760px) {
  .simulation-topbar,
  .day-dashboard {
    align-items: flex-start;
    flex-direction: column;
  }

  .simulation-vitals {
    width: 100%;
    flex-wrap: wrap;
  }

  .day-track {
    width: 100%;
  }

  .urgent-choices {
    grid-template-columns: repeat(2, 1fr);
  }
}

.results-shell {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgb(78 139 116 / 28%), transparent 40rem),
    #090c12;
  padding: clamp(1rem, 4vw, 3rem);
}

.results-shell.is-missed {
  background:
    radial-gradient(circle at 50% -20%, rgb(150 55 72 / 25%), transparent 40rem),
    #090c12;
}

.results-hero,
.result-stats,
.results-grid,
.results-footer {
  width: min(100%, 1100px);
  margin-right: auto;
  margin-left: auto;
}

.results-hero {
  padding: 2rem 0 1.2rem;
  text-align: center;
}

.results-hero h1 {
  margin: 0.3rem 0;
  color: #74e2aa;
  font-size: clamp(2.1rem, 8vw, 5rem);
  letter-spacing: -0.06em;
}

.is-missed .results-hero h1 {
  color: #ff7889;
}

.results-hero > p:last-child {
  color: #abb6ce;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
}

.result-stats article,
.burndown-card,
.result-details,
.results-footer {
  border: 1px solid #303b53;
  border-radius: 0.8rem;
  background: #121824;
}

.result-stats article {
  padding: 0.8rem;
}

.result-stats span,
.result-stats strong {
  display: block;
}

.result-stats span {
  color: #8794ae;
  font-size: 0.63rem;
  text-transform: uppercase;
}

.result-stats strong {
  margin-top: 0.2rem;
  font-size: 1.25rem;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.burndown-card,
.result-details {
  padding: 1rem;
}

.burndown-card h2,
.result-details h2 {
  margin: 0.15rem 0 0;
}

.burndown-card svg {
  width: 100%;
  margin-top: 1rem;
  border-radius: 0.5rem;
  background: #0a0e16;
}

.burndown-card text {
  fill: #7d8aa5;
  font-size: 12px;
}

.ideal-line {
  stroke: #46516a;
  stroke-dasharray: 7 7;
  stroke-width: 2;
}

.actual-line {
  fill: none;
  stroke: #71d9a5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.is-missed .actual-line {
  stroke: #ef7585;
}

.result-details ul {
  margin: 0.8rem 0 1rem;
  padding-left: 1.1rem;
  color: #aab5cc;
  font-size: 0.75rem;
  line-height: 1.5;
}

.result-details h3 {
  margin: 1rem 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.no-expiry {
  color: #8390aa;
  font-size: 0.74rem;
}

.expiry-results {
  display: grid;
  gap: 0.45rem;
}

.expiry-results article {
  border-left: 0.2rem solid #e66878;
  border-radius: 0.35rem;
  background: #21141b;
  padding: 0.55rem;
}

.expiry-results span,
.expiry-results strong,
.expiry-results em {
  display: block;
}

.expiry-results span {
  color: #af8790;
  font-size: 0.61rem;
}

.expiry-results strong {
  margin: 0.2rem 0;
  font-size: 0.72rem;
}

.expiry-results em {
  color: #ff8593;
  font-size: 0.67rem;
  font-style: normal;
}

.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
}

.results-footer p {
  margin: 0;
  color: #9aa7c0;
  font-size: 0.78rem;
}

.results-footer button,
.fired-screen button {
  border: 0;
  border-radius: 0.45rem;
  background: #75e0ab;
  padding: 0.7rem 0.9rem;
  color: #11231b;
  cursor: pointer;
  font-weight: 900;
}

.promotion-overlay {
  position: fixed;
  z-index: 30;
  display: grid;
  inset: 0;
  place-items: center;
  overflow: hidden;
  background: rgb(8 20 15 / 76%);
  pointer-events: none;
  text-align: center;
  animation: promotion-fade 3s ease both;
}

.promotion-overlay > strong {
  color: #8cffbd;
  font-size: clamp(3rem, 14vw, 9rem);
  letter-spacing: -0.08em;
  text-shadow: 0 0 2rem rgb(100 255 168 / 55%);
}

.promotion-overlay > p {
  position: absolute;
  top: 62%;
  color: #d6ffe7;
  font-weight: 800;
}

.money-rain {
  position: absolute;
  inset: 0;
}

.money-rain span {
  position: absolute;
  top: -10%;
  left: var(--money-x);
  color: #a3ffbf;
  font-size: 2rem;
  font-weight: 900;
  animation: money-fall 2.1s var(--money-delay) linear infinite;
}

.fired-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle, rgb(126 13 25 / 28%), transparent 35rem),
    #050609;
  padding: 1rem;
  text-align: center;
}

.fired-screen p,
.fired-screen span {
  color: #8d7378;
}

.fired-screen h1 {
  margin: 0.4rem 0;
  color: #8f101f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 15vw, 10rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  text-shadow: 0 0 2rem rgb(177 10 32 / 30%);
  animation: fired-reveal 1.8s ease both;
}

.fired-screen strong {
  color: #d9bcc0;
}

.fired-screen span {
  margin: 0.5rem 0 1.5rem;
}

.fired-screen button {
  background: #701624;
  color: #ffecef;
}

@keyframes money-fall {
  to { transform: translateY(120vh) rotate(540deg); }
}

@keyframes promotion-fade {
  0% { opacity: 0; }
  12%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes fired-reveal {
  from { opacity: 0; transform: scale(1.15); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes auto-place {
  from {
    opacity: 0;
    transform: translateX(-1rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .assigned-task.is-auto-placed {
    animation: none;
  }
}

@media (max-width: 760px) {
  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .results-footer {
    align-items: stretch;
    flex-direction: column;
  }
}
