/*
  M4B — Runtime Home / Mission Control shell styles.
  Feature-highlight inspired realm preview grid.
*/

.civ-runtime-home {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding:
    0.75rem
    1rem
    2rem;
  max-width: 920px;
  margin: 0 auto;
}

.civ-home-compass {
  position: sticky;
  top: 0;
  z-index: 40;
  margin:
    0
    -1rem;
  padding:
    0.5rem
    1rem;
  backdrop-filter: blur(12px);
  background: rgb(0 0 0 / 72%);
}

.civ-home-compass__item.is-active {
  color: var(--civ-signal, #ffab00);
  border-color: rgb(255 171 0 / 35%);
}

.civ-home-state,
.civ-home-primary,
.civ-home-signal,
.civ-home-previews,
.civ-home-proof {
  width: 100%;
}

.civ-home-state__label,
.civ-home-primary__eyebrow,
.civ-home-signal__eyebrow,
.civ-home-previews__badge {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--civ-text-muted, #d4a373);
}

.civ-home-state__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
}

.civ-home-state__phase {
  display: inline-flex;
  padding:
    0.2rem
    0.55rem;
  border: 1px solid rgb(255 171 0 / 28%);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--civ-signal, #ffab00);
}

.civ-home-state__headline,
.civ-home-primary__headline,
.civ-home-signal__headline {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.15;
  color: #fff;
}

.civ-home-state__subcopy,
.civ-home-primary__subcopy,
.civ-home-signal__subcopy {
  margin: 0.55rem 0 0;
  color: rgb(255 255 255 / 78%);
  line-height: 1.45;
}

.civ-home-primary {
  padding: 1rem;
  border: 1px solid rgb(255 109 0 / 35%);
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgb(16 26 36 / 95%),
      rgb(8 12 18 / 95%)
    );
  box-shadow: 0 12px 40px rgb(255 109 0 / 10%);
}

.civ-home-primary__cta {
  margin-top: 1rem;
  width: 100%;
  min-height: 48px;
}

.civ-home-signal {
  padding: 1rem;
  border-radius: 16px;
}

.civ-home-signal__meta {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: rgb(255 171 0 / 85%);
}

.civ-home-signal__cta,
.civ-home-signal__link,
.civ-home-proof__link {
  margin-top: 0.75rem;
}

.civ-home-signal__link,
.civ-home-proof__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--civ-signal, #ffab00);
  cursor: pointer;
  padding: 0;
}

.civ-home-previews__head {
  margin-bottom: 0.85rem;
}

.civ-home-previews__title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  letter-spacing: 0.02em;
}

.civ-home-previews__hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: rgb(255 255 255 / 62%);
}

.civ-home-previews__grid {
  display: grid;
  gap: 0.85rem;
}

.civ-realm-preview {
  position: relative;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  background:
    linear-gradient(
      160deg,
      rgb(16 26 36 / 82%),
      rgb(8 12 18 / 92%)
    );
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 6%),
    0 16px 40px rgb(0 0 0 / 35%);
  overflow: hidden;
}

.civ-realm-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at top right,
      rgb(255 171 0 / 10%),
      transparent 55%
    );
  opacity: 0.8;
}

.civ-realm-preview--sky::before {
  background:
    radial-gradient(
      circle at top right,
      rgb(56 189 248 / 12%),
      transparent 55%
    );
}

.civ-realm-preview--emerald::before {
  background:
    radial-gradient(
      circle at top right,
      rgb(16 185 129 / 12%),
      transparent 55%
    );
}

.civ-realm-preview--violet::before {
  background:
    radial-gradient(
      circle at top right,
      rgb(167 139 250 / 12%),
      transparent 55%
    );
}

.civ-realm-preview--rose::before {
  background:
    radial-gradient(
      circle at top right,
      rgb(244 114 182 / 10%),
      transparent 55%
    );
}

@media (hover: hover) and (pointer: fine) {

  .civ-realm-preview {
    transition:
      transform 180ms ease,
      border-color 180ms ease;
  }

  .civ-realm-preview:hover {
    transform: translateY(-2px);
    border-color: rgb(255 171 0 / 22%);
  }

}

.civ-realm-preview__header,
.civ-realm-preview__headline,
.civ-realm-preview__subcopy,
.civ-realm-preview__inset,
.civ-realm-preview__cta {
  position: relative;
  z-index: 1;
}

.civ-realm-preview__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.civ-realm-preview__badge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--civ-text-muted, #d4a373);
}

.civ-realm-preview__state {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(102 230 163 / 90%);
}

.civ-realm-preview__headline {
  margin: 0.65rem 0 0;
  font-size: 1.08rem;
  line-height: 1.25;
  color: #fff;
}

.civ-realm-preview__subcopy {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgb(255 255 255 / 74%);
}

.civ-realm-preview__inset {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 8%);
  background: rgb(0 0 0 / 28%);
}

.civ-realm-preview__cta {
  margin-top: 0.9rem;
  width: 100%;
  min-height: 44px;
}

.civ-realm-inset--empty {
  color: rgb(255 255 255 / 62%);
  font-size: 0.88rem;
}

.civ-realm-inset__live {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
}

.civ-realm-inset__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #66e6a3;
  box-shadow: 0 0 12px rgb(102 230 163 / 65%);
}

.civ-realm-inset__bar-row + .civ-realm-inset__bar-row {
  margin-top: 0.55rem;
}

.civ-realm-inset__bar-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.civ-realm-inset__bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  overflow: hidden;
}

.civ-realm-inset__bar-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      rgb(56 189 248 / 85%),
      rgb(255 171 0 / 85%)
    );
  transition: width 600ms ease;
}

.civ-realm-inset__footnote,
.civ-realm-inset__sync-label {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: rgb(255 255 255 / 55%);
}

.civ-realm-inset__slide-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  color: rgb(255 255 255 / 72%);
}

.civ-realm-inset__slide-window {
  height: 7.5rem;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 75%, transparent);
}

.civ-realm-inset__slide-track {
  display: grid;
  gap: 0.45rem;
  animation: civ-home-slide-roster 16s linear infinite;
}

@keyframes civ-home-slide-roster {

  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }

}

@media (prefers-reduced-motion: reduce) {

  .civ-realm-inset__slide-track {
    animation: none;
  }

}

.civ-realm-inset__slide-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.civ-realm-inset__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background:
    linear-gradient(
      145deg,
      rgb(16 185 129 / 35%),
      rgb(255 171 0 / 25%)
    );
  border: 1px solid rgb(255 255 255 / 12%);
}

.civ-realm-inset__slide-copy {
  display: grid;
  gap: 0.1rem;
  font-size: 0.82rem;
}

.civ-realm-inset__slide-copy span {
  color: rgb(255 255 255 / 58%);
  font-size: 0.74rem;
}

.civ-realm-inset__tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.civ-realm-inset__tile {
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 8%);
  background: rgb(255 255 255 / 4%);
  display: grid;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: rgb(255 255 255 / 62%);
}

.civ-realm-inset__tile strong {
  font-size: 0.78rem;
  color: rgb(255 255 255 / 88%);
}

.civ-realm-inset__shimmer-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.65rem;
}

.civ-realm-inset__shimmer {
  width: 0.65rem;
  height: 2rem;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgb(167 139 250 / 15%),
      rgb(255 171 0 / 35%),
      rgb(167 139 250 / 15%)
    );
  animation: civ-home-shimmer 2.4s ease-in-out infinite;
}

@keyframes civ-home-shimmer {

  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }

}

.civ-realm-inset__shimmer-row p {
  margin: 0;
  font-size: 0.82rem;
  color: rgb(255 255 255 / 72%);
}

.civ-realm-inset__screen {
  display: grid;
  gap: 0.35rem;
}

.civ-realm-inset__screen-badge {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 171 0 / 85%);
}

.civ-realm-inset__screen strong {
  font-size: 0.95rem;
}

.civ-realm-inset__screen p {
  margin: 0;
  font-size: 0.82rem;
  color: rgb(255 255 255 / 68%);
}

.civ-realm-inset__tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.civ-realm-inset__tab {
  padding:
    0.18rem
    0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 55%);
  border: 1px solid transparent;
}

.civ-realm-inset__tab.is-active {
  color: #fff;
  border-color: rgb(244 114 182 / 28%);
  background: rgb(244 114 182 / 10%);
}

.civ-realm-inset__member-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgb(255 255 255 / 6%);
  font-size: 0.8rem;
}

.civ-realm-inset__member-row:first-child {
  border-top: 0;
}

.civ-realm-inset__member-label {
  color: rgb(255 255 255 / 58%);
}

.civ-realm-inset__member-value {
  text-align: right;
  color: rgb(255 255 255 / 86%);
}

.civ-home-proof__drawer {
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 14px;
  background: rgb(11 17 24 / 72%);
  overflow: hidden;
}

.civ-home-proof__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.civ-home-proof__summary::-webkit-details-marker {
  display: none;
}

.civ-home-proof__title {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--civ-text-muted, #d4a373);
}

.civ-home-proof__peek {
  font-size: 0.92rem;
  color: rgb(255 255 255 / 76%);
}

.civ-home-proof__body {
  padding:
    0
    1rem
    1rem;
}

.civ-home-proof__list {
  margin: 0;
  padding-left: 1rem;
  color: rgb(255 255 255 / 82%);
}

.civ-home-proof__list li + li {
  margin-top: 0.35rem;
}

.civ-home-proof__empty {
  margin: 0;
  color: rgb(255 255 255 / 62%);
}

@media (min-width: 768px) {

  .civ-runtime-home {
    gap: 1.15rem;
    padding:
      1rem
      1.25rem
      2.5rem;
  }

  .civ-home-previews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .civ-realm-preview--arena,
  .civ-realm-preview--creators {
    grid-column: span 2;
  }

  .civ-home-primary__cta,
  .civ-realm-preview__cta {
    width: auto;
    min-width: 220px;
  }

}

@media (min-width: 980px) {

  .civ-home-previews__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .civ-realm-preview--arena {
    grid-column: span 3;
  }

  .civ-realm-preview--creators {
    grid-column: span 3;
  }

  .civ-realm-preview--signals,
  .civ-realm-preview--cinema,
  .civ-realm-preview--identity {
    grid-column: span 2;
  }

}

/*
  M4E-1 — Live Realm daily operating screen
*/

.civ-live-realm {
  --dne-bg: #030404;
  --fire-500: #ff7a00;
  --ember: #ff9f2e;
  --text-primary: rgb(255 250 236 / 96%);
  --text-secondary: rgb(255 238 210 / 74%);
  --text-muted: rgb(255 238 210 / 48%);
  gap: 1.1rem;
  scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px));
}

.civ-live-hero__kicker,
.civ-live-streak__label,
.civ-live-next-flame__label,
.civ-live-paths__label,
.civ-live-activity__label,
.civ-live-shield__label,
.civ-live-memory__label,
.civ-live-why__label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.civ-live-hero__headline {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", "Cinzel", Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.1;
  color: var(--text-primary);
}

.civ-live-hero__subcopy {
  margin: 0.5rem 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.civ-live-streak,
.civ-live-next-flame,
.civ-live-paths,
.civ-live-activity,
.civ-live-shield,
.civ-live-memory,
.civ-live-why {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgb(255 122 0 / 22%);
  background:
    linear-gradient(
      160deg,
      rgb(8 13 16 / 88%),
      rgb(4 8 10 / 92%)
    );
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 5%),
    0 14px 36px rgb(0 0 0 / 38%);
}

.civ-live-streak__headline {
  margin: 0.45rem 0 0;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  line-height: 1.2;
  color: var(--text-primary);
}

.civ-live-streak__detail,
.civ-live-next-flame__detail,
.civ-live-memory__subcopy,
.civ-live-why__reputation {
  margin: 0.5rem 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
  font-size: 0.92rem;
}

.civ-live-streak__cta {
  margin-top: 1rem;
  width: 100%;
  min-height: 48px;
  background:
    linear-gradient(
      180deg,
      #ffb020 0%,
      #ff7a00 55%,
      #d94a00 100%
    );
  border: 0;
  border-radius: 999px;
  color: #1a0d00;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.civ-live-next-flame__countdown {
  margin: 0.55rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  letter-spacing: 0.08em;
  color: var(--ember);
}

.civ-live-paths__head {
  margin-bottom: 0.35rem;
}

.civ-live-paths__subcopy {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.civ-live-paths-tray {
  padding: 1rem;
  border-radius: 20px;
  background:
    linear-gradient(
      165deg,
      rgb(10 16 20 / 92%),
      rgb(4 8 10 / 96%)
    );
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 6%),
    inset 0 0 0 1px rgb(255 122 0 / 10%),
    0 16px 40px rgb(0 0 0 / 42%);
}

.civ-live-paths__list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.civ-live-path {
  position: relative;
  list-style: none;
}

.civ-live-path__status-bar {
  position: absolute;
  top: 0;
  left: 0.85rem;
  right: 0.85rem;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgb(255 176 32 / 0%),
      rgb(255 176 32 / 85%),
      rgb(255 122 0 / 0%)
    );
  opacity: 0.85;
  pointer-events: none;
}

.civ-live-path__button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(0 0 0 / 30%);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.civ-live-path--recommended .civ-live-path__button {
  border-color: rgb(255 159 46 / 42%);
  background:
    linear-gradient(
      145deg,
      rgb(255 122 0 / 14%),
      rgb(0 0 0 / 34%)
    );
  box-shadow:
    0 10px 28px rgb(255 122 0 / 12%),
    inset 0 1px 0 rgb(255 255 255 / 8%);
}

.civ-live-path--completed-today .civ-live-path__button {
  opacity: 0.72;
}

.civ-live-path--locked .civ-live-path__button,
.civ-live-path.is-unavailable .civ-live-path__button {
  opacity: 0.58;
  cursor: not-allowed;
}

.civ-live-path__icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 159 46 / 10%);
  border: 1px solid rgb(255 159 46 / 18%);
  flex-shrink: 0;
}

.civ-live-path__icon {
  font-size: 1.05rem;
  color: var(--ember);
  line-height: 1;
}

.civ-live-path__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.civ-live-path__label-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.civ-live-path__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.civ-live-path__reason {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.civ-live-path__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
  background: rgb(255 159 46 / 12%);
  border: 1px solid rgb(255 159 46 / 22%);
  white-space: nowrap;
}

.civ-live-path--recommended .civ-live-path__chip {
  color: #1a0d00;
  background: rgb(255 176 32 / 92%);
  border-color: rgb(255 176 32 / 95%);
}

.civ-live-path__chevron {
  color: rgb(255 238 210 / 42%);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.civ-live-path__streak-badge {
  display: none;
}

.civ-live-paths--day-complete .civ-live-path--streak:not(.civ-live-path--recommended) {
  opacity: 0.62;
}

@media (
  min-width: 980px
) and (
  hover: hover
) {

  .civ-live-path__button:hover {
    transform: translateY(-1px);
    border-color: rgb(255 159 46 / 28%);
    box-shadow: 0 10px 24px rgb(0 0 0 / 28%);
  }

  .civ-live-path--recommended .civ-live-path__button:hover {
    box-shadow:
      0 12px 30px rgb(255 122 0 / 16%),
      inset 0 1px 0 rgb(255 255 255 / 10%);
  }

}

@media (
  prefers-reduced-motion: reduce
) {

  .civ-live-path__button {
    transition: none;
  }

  .civ-live-path__button:hover {
    transform: none;
  }

}

.civ-live-realm__support-row {
  display: grid;
  gap: 0.85rem;
}

.civ-live-activity__list,
.civ-live-memory__rows {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.civ-live-activity__list li,
.civ-live-memory__rows li {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgb(0 0 0 / 24%);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.civ-live-shield {
  border-color: rgb(94 203 255 / 24%);
  background:
    linear-gradient(
      160deg,
      rgb(8 13 20 / 90%),
      rgb(4 8 12 / 94%)
    );
}

.civ-live-shield__detail {
  margin: 0.45rem 0 0;
  color: rgb(94 203 255 / 88%);
}

.civ-live-memory__rows li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.civ-live-why__chain {
  margin: 0.45rem 0 0;
  color: var(--ember);
  font-size: 0.95rem;
}

.civ-live-why__steps {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.civ-live-why__step h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.civ-live-why__step p {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.civ-live-feedback {
  padding: 1rem 0.25rem 0.5rem;
  text-align: center;
}

.civ-live-feedback__line {
  margin: 0;
  font-family: "Cormorant Garamond", "Cinzel", Georgia, serif;
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  color: var(--ember);
}

.civ-live-feedback__subline {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {

  .civ-live-realm {
    max-width: 1040px;
  }

  .civ-live-realm__support-row {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }

  .civ-live-why__steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .civ-live-streak__cta {
    width: auto;
    min-width: 240px;
  }

}

/*
  M4E-2 — Next Flame ring + state transitions
*/

.civ-live-streak {
  position: relative;
  overflow: hidden;
}

.civ-live-streak__ember-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      transparent 38%,
      rgb(255 159 46 / 22%) 50%,
      transparent 62%
    );
  transform: translateX(-120%);
  opacity: 0;
}

.civ-live-streak--ember-scan
  .civ-live-streak__ember-scan {
  animation:
    civ-live-ember-scan
    0.9s
    ease-out
    forwards;
}

.civ-live-streak--complete-pulse {
  animation:
    civ-live-streak-pulse
    0.85s
    ease-out
    1;
}

.civ-live-next-flame__ring-wrap {
  position: relative;
  width: min(220px, 72vw);
  margin: 0.75rem auto 0;
  aspect-ratio: 1;
}

.civ-live-next-flame__ring {
  width: 100%;
  height: 100%;
  display: block;
}

.civ-live-next-flame__ring-track {
  fill: none;
  stroke: rgb(255 159 46 / 14%);
  stroke-width: 6;
}

.civ-live-next-flame__ring-progress {
  fill: none;
  stroke: var(--ember);
  stroke-width: 6;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 326.73;
  stroke-dashoffset: calc(
    326.73 *
    (
      1 -
      var(
        --next-flame-progress,
        0
      ) /
      100
    )
  );
  transition:
    stroke-dashoffset
    1s
    linear;
  filter: drop-shadow(
    0 0 8px rgb(255 122 0 / 35%)
  );
}

.civ-live-next-flame__ring-wrap
  .civ-live-next-flame__countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: clamp(
    0.95rem,
    3.2vw,
    1.25rem
  );
}

.civ-live-realm--connect-enter
  .civ-live-hero,
.civ-live-realm--connect-enter
  .civ-live-streak {
  animation:
    civ-live-fade-in
    0.65s
    ease-out;
}

.civ-live-paths--tray-enter
  .civ-live-path {
  animation:
    civ-live-slide-up
    0.55s
    ease-out
    backwards;
}

.civ-live-paths--tray-enter
  .civ-live-path:nth-child(1) {
  animation-delay: 0.04s;
}

.civ-live-paths--tray-enter
  .civ-live-path:nth-child(2) {
  animation-delay: 0.08s;
}

.civ-live-paths--tray-enter
  .civ-live-path:nth-child(3) {
  animation-delay: 0.12s;
}

.civ-live-paths--tray-enter
  .civ-live-path:nth-child(4) {
  animation-delay: 0.16s;
}

.civ-live-paths--tray-enter
  .civ-live-path:nth-child(5) {
  animation-delay: 0.2s;
}

.civ-live-paths--tray-enter
  .civ-live-path:nth-child(6) {
  animation-delay: 0.24s;
}

.civ-live-paths--day-complete
  .civ-live-path--streak {
  opacity: 0.58;
}

.civ-live-paths--day-complete
  .civ-live-path--streak
  .civ-live-path__streak-badge {
  opacity: 0.72;
}

.civ-live-activity__row--enter {
  animation:
    civ-live-row-enter
    0.45s
    ease-out;
}

.civ-live-activity__row--highlight {
  background:
    linear-gradient(
      90deg,
      rgb(255 159 46 / 12%),
      rgb(0 0 0 / 24%)
    );
  box-shadow:
    inset 0 0 0 1px
    rgb(255 159 46 / 28%);
}

.civ-live-feedback--enter {
  animation:
    civ-live-fade-in
    0.7s
    ease-out;
}

.civ-live-streak__cta,
.civ-live-path__button {
  transition:
    transform
    0.18s
    ease,
    box-shadow
    0.18s
    ease,
    filter
    0.18s
    ease;
}

.civ-live-streak__cta:active,
.civ-live-path__button:active {
  transform: scale(0.98);
}

@media (
  min-width: 980px
) and (
  hover: hover
) {

  .civ-live-card--interactive {
    transition:
      transform
      0.28s
      ease,
      box-shadow
      0.28s
      ease;
  }

  .civ-live-card--interactive:hover {
    transform:
      translateY(-2px)
      perspective(900px)
      rotateX(1.2deg);
    box-shadow:
      0 18px 44px
      rgb(255 122 0 / 14%);
  }

}

@keyframes civ-live-ember-scan {

  0% {
    transform: translateX(-120%);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translateX(120%);
    opacity: 0;
  }

}

@keyframes civ-live-streak-pulse {

  0% {
    box-shadow:
      0 14px 36px
      rgb(0 0 0 / 38%);
  }

  45% {
    box-shadow:
      0 14px 36px
      rgb(0 0 0 / 38%),
      0 0 0 2px
      rgb(255 159 46 / 42%),
      0 0 28px
      rgb(255 122 0 / 22%);
  }

  100% {
    box-shadow:
      0 14px 36px
      rgb(0 0 0 / 38%);
  }

}

@keyframes civ-live-fade-in {

  from {
    opacity: 0.72;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes civ-live-slide-up {

  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes civ-live-row-enter {

  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }

}

@media (
  prefers-reduced-motion: reduce
) {

  .civ-live-streak--ember-scan
    .civ-live-streak__ember-scan,
  .civ-live-streak--complete-pulse,
  .civ-live-realm--connect-enter
    .civ-live-hero,
  .civ-live-realm--connect-enter
    .civ-live-streak,
  .civ-live-paths--tray-enter
    .civ-live-path,
  .civ-live-activity__row--enter,
  .civ-live-feedback--enter {
    animation: none !important;
  }

  .civ-live-next-flame__ring-progress {
    transition: none;
  }

  .civ-live-card--interactive {
    transition: none;
  }

  .civ-live-card--interactive:hover {
    transform: none;
  }

}

/*
  M4E-4 — Interactive template fidelity pass
*/

.civ-live-section-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  background: rgb(255 159 46 / 10%);
  border: 1px solid rgb(255 159 46 / 22%);
}

.civ-live-glass-card {
  position: relative;
  padding: 1.1rem;
  border-radius: 22px;
  border: 1px solid rgb(255 255 255 / 8%);
  background:
    linear-gradient(
      165deg,
      rgb(12 18 22 / 92%),
      rgb(4 8 10 / 96%)
    );
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 7%),
    inset 0 0 0 1px rgb(255 122 0 / 8%),
    0 20px 48px rgb(0 0 0 / 45%);
  overflow: hidden;
}

.civ-live-glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 12% 0%,
      rgb(255 159 46 / 12%),
      transparent 42%
    );
}

.civ-live-inset-panel {
  position: relative;
  padding: 0.95rem;
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 8%);
  background:
    linear-gradient(
      180deg,
      rgb(0 0 0 / 34%),
      rgb(0 0 0 / 18%)
    );
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
}

.civ-live-inset-panel__label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.civ-live-inset-panel__copy {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
  font-size: 0.88rem;
}

.civ-live-inset-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.civ-live-inset-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgb(0 0 0 / 28%);
  border: 1px solid rgb(255 255 255 / 6%);
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.civ-live-inset-row--empty {
  color: var(--text-muted);
  font-style: normal;
}

.civ-live-inset-row__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(141 255 122 / 88%);
  box-shadow: 0 0 10px rgb(141 255 122 / 45%);
  flex-shrink: 0;
}

.civ-live-realm--fidelity {
  gap: 1.25rem;
}

.civ-live-hero--premium {
  position: relative;
  padding: 1.1rem 0.25rem 0.35rem;
  overflow: hidden;
}

.civ-live-hero__glow {
  position: absolute;
  top: -2rem;
  left: 10%;
  width: min(320px, 70vw);
  height: 160px;
  pointer-events: none;
  background:
    radial-gradient(
      circle,
      rgb(255 122 0 / 18%),
      transparent 68%
    );
  filter: blur(8px);
}

.civ-live-hero__badge {
  position: relative;
}

.civ-live-hero__headline {
  position: relative;
  font-size: clamp(2rem, 6vw, 2.75rem);
}

.civ-live-continuity-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.civ-live-continuity-panel__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.civ-live-continuity-panel__grid {
  display: grid;
  gap: 0.85rem;
}

.civ-live-continuity-panel
  .civ-live-streak--kpi,
.civ-live-continuity-panel
  .civ-live-next-flame--kpi {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.civ-live-streak__status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.civ-live-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgb(255 255 255 / 10%);
}

.civ-live-status-chip--safe {
  color: rgb(141 255 122 / 92%);
  border-color: rgb(141 255 122 / 28%);
  background: rgb(141 255 122 / 10%);
}

.civ-live-status-chip--urgent {
  color: var(--ember);
  border-color: rgb(255 159 46 / 30%);
  background: rgb(255 159 46 / 10%);
}

.civ-live-status-chip--shield {
  color: rgb(94 203 255 / 92%);
  border-color: rgb(94 203 255 / 28%);
  background: rgb(94 203 255 / 10%);
}

.civ-live-status-chip--meta {
  color: var(--text-muted);
}

.civ-live-realm__main-grid {
  display: grid;
  gap: 1rem;
}

.civ-live-state-panel__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.civ-live-state-panel__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.75rem 0;
  padding: 0.25rem;
  border-radius: 14px;
  background: rgb(0 0 0 / 28%);
  border: 1px solid rgb(255 255 255 / 8%);
}

.civ-live-state-panel__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

#live-state-tab-signal:checked
  ~ .civ-live-state-panel__tabs
  label[for="live-state-tab-signal"],
#live-state-tab-shield:checked
  ~ .civ-live-state-panel__tabs
  label[for="live-state-tab-shield"],
#live-state-tab-memory:checked
  ~ .civ-live-state-panel__tabs
  label[for="live-state-tab-memory"] {
  color: var(--text-primary);
  background: rgb(255 159 46 / 14%);
  border: 1px solid rgb(255 159 46 / 24%);
}

.civ-live-state-panel__panel {
  display: none;
}

#live-state-tab-signal:checked
  ~ .civ-live-state-panel__panels
  [data-live-state-panel="signal"],
#live-state-tab-shield:checked
  ~ .civ-live-state-panel__panels
  [data-live-state-panel="shield"],
#live-state-tab-memory:checked
  ~ .civ-live-state-panel__panels
  [data-live-state-panel="memory"] {
  display: block;
}

.civ-live-why--tiles .civ-live-why__tile-grid {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.civ-live-why__tile {
  min-height: 118px;
}

.civ-live-why__tile-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
  border-radius: 10px;
  color: var(--ember);
  background: rgb(255 159 46 / 10%);
  border: 1px solid rgb(255 159 46 / 18%);
  font-size: 1rem;
}

.civ-live-why__tile h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.civ-live-why__tile p {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

@media (min-width: 900px) {

  .civ-live-continuity-panel__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }

  .civ-live-realm__main-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: start;
  }

  .civ-live-why--tiles .civ-live-why__tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (
  prefers-reduced-motion: reduce
) {

  .civ-live-state-panel__tab,
  .civ-live-why__tile,
  .civ-live-glass-card {
    transition: none;
  }

}


