:root {
  --free-bg: #f7f7f4;
  --free-surface: rgba(255, 255, 255, 0.78);
  --free-surface-strong: rgba(255, 255, 255, 0.92);
  --free-border: rgba(20, 24, 28, 0.1);
  --free-text: #151719;
  --free-muted: #63686f;
  --free-accent: #14171a;
  --free-accent-soft: #eef0ef;
  --free-line: rgba(20, 24, 28, 0.08);
  --free-shadow: 0 26px 72px rgba(32, 36, 38, 0.08);
}

.free-app-body {
  background:
    linear-gradient(120deg, rgba(28, 33, 37, 0.05) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #fbfbf8 0%, #f4f4ef 56%, #ecece6 100%);
  background-size: auto, auto;
  color: var(--free-text);
}

.free-app-shell {
  padding-top: 22px;
}

.free-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  opacity: 0;
  transform: translateY(-10px);
  animation: freeReveal 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.free-brand,
.free-nav a {
  color: var(--free-text);
  text-decoration: none;
}

.free-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: Georgia, "Times New Roman", "Source Han Serif SC", serif;
}

.free-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.free-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--free-border);
  font-size: 14px;
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.free-nav a:hover,
.free-nav a:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 26px rgba(22, 26, 30, 0.08);
}

.free-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.82fr);
  gap: 20px;
  margin-bottom: 22px;
  min-height: calc(100vh - 126px);
  align-items: stretch;
}

.free-hero-copy,
.free-hero-side > section,
.free-upload-panel,
.member-entry {
  background: var(--free-surface);
  border: 1px solid var(--free-border);
  box-shadow: var(--free-shadow);
  backdrop-filter: blur(10px);
}

.free-hero-copy,
.free-hero-side > section {
  border-radius: 18px;
}

.free-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 74px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 247, 244, 0.86));
  opacity: 0;
  transform: translateY(20px);
  animation: freeReveal 820ms cubic-bezier(0.18, 0.78, 0.2, 1) 90ms forwards;
}

.free-hero-copy h1 {
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Source Han Serif SC", serif;
  font-size: clamp(40px, 6vw, 78px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}

.free-hero-text {
  max-width: 720px;
  margin: 0;
  color: var(--free-muted);
  font-size: 16px;
  line-height: 1.75;
}

.free-hero-side {
  display: grid;
  gap: 16px;
  align-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: freeReveal 820ms cubic-bezier(0.18, 0.78, 0.2, 1) 180ms forwards;
}

.free-account-card,
.free-intro-card,
.free-upload-panel {
  padding: 24px;
  border-radius: 18px;
  background: var(--free-surface-strong);
}

.free-account-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.free-account-title {
  display: flex;
  gap: 14px;
  align-items: center;
}

.free-account-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 50%;
  object-fit: cover;
  background: #f5efe5;
  border: 1px solid rgba(20, 24, 28, 0.1);
  box-shadow: 0 14px 30px rgba(32, 36, 38, 0.12);
}

.free-account-email {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.free-hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.free-hero-tags span {
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--free-accent-soft);
  color: #2b2925;
  font-size: 13px;
}

.free-upload-panel {
  margin-bottom: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 246, 0.92));
}

.free-upload-form {
  display: grid;
  gap: 16px;
}

.free-upload-field {
  padding: 18px;
  border-radius: 14px;
  background: rgba(249, 247, 242, 0.95);
  border: 1px dashed rgba(32, 31, 27, 0.16);
}

.free-upload-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.platform-import-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28, 20, 12, 0.34);
  backdrop-filter: blur(14px);
}

.platform-import-modal.hidden {
  display: none;
}

.platform-import-card {
  position: relative;
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid rgba(226, 123, 26, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 139, 36, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 247, 237, 0.96));
  box-shadow: 0 30px 80px rgba(124, 71, 20, 0.24);
}

.platform-import-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(226, 123, 26, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #8b4513;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.platform-import-card h3 {
  margin: 4px 0 10px;
  font-size: clamp(24px, 3vw, 34px);
}

.platform-import-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.platform-import-field select,
.platform-import-field input {
  width: 100%;
  border: 1px solid rgba(142, 80, 22, 0.16);
  border-radius: 14px;
  padding: 13px 14px;
  color: #25180d;
  background: rgba(255, 255, 255, 0.9);
}

.platform-import-panel {
  display: grid;
  gap: 10px;
}

.platform-import-panel > button.secondary {
  width: 100%;
  border-radius: 14px;
  padding: 12px 16px;
  color: #7e3b06;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(218, 98, 18, 0.18);
  cursor: pointer;
}

.platform-import-divider {
  position: relative;
  display: grid;
  place-items: center;
  margin: 14px 0 2px;
  color: rgba(64, 42, 24, 0.52);
  font-size: 12px;
}

.platform-import-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(142, 80, 22, 0.12);
}

.platform-import-divider span {
  position: relative;
  padding: 0 10px;
  background: rgba(255, 250, 242, 0.96);
}

.platform-import-matches {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.platform-import-match {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(218, 98, 18, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.platform-import-match strong {
  display: block;
  color: #24170d;
}

.platform-import-match small {
  color: rgba(54, 40, 29, 0.62);
}

.platform-import-match button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #f58112, #ce3f00 72%, #ff9e20);
  cursor: pointer;
}

.platform-import-status {
  min-height: 22px;
  margin: 14px 0 0;
}

.platform-import-status.error {
  color: #b42318;
}

.platform-import-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.platform-import-actions button,
.platform-import-actions .button-link {
  width: 100%;
}

.platform-import-actions button:not(.secondary) {
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #f58112, #ce3f00 72%, #ff9e20);
  box-shadow: 0 12px 26px rgba(212, 72, 3, 0.22);
  cursor: pointer;
}

.platform-import-actions button.secondary {
  border-radius: 14px;
  padding: 13px 16px;
  color: #7e3b06;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(218, 98, 18, 0.18);
  cursor: pointer;
}

.free-app-body .member-entry,
.free-app-body .panel {
  border-radius: 18px;
}

.flow-after-analysis {
  display: none;
}

body[data-flow="report"] .flow-after-analysis {
  display: block;
}

body[data-flow="start"] #player-picker,
body[data-flow="start"] #reports-panel,
body[data-flow="start"] #tasks-panel,
body[data-flow="start"] #dashboard {
  display: none !important;
}

body[data-flow="ready"] #player-picker,
body[data-flow="ready"] #dashboard {
  display: none !important;
}

body[data-flow="pick"] #reports-panel,
body[data-flow="pick"] #tasks-panel {
  display: none !important;
}

body[data-flow="pick"] .free-hero {
  min-height: auto;
}

body[data-flow="pick"] .free-hero-copy {
  padding: 34px;
}

body[data-flow="pick"] .free-hero-copy h1 {
  font-size: clamp(30px, 4vw, 48px);
}

body[data-flow="ready"] .free-hero,
body[data-flow="report"] .free-hero {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
}

body[data-flow="ready"] .free-hero-copy,
body[data-flow="report"] .free-hero-copy {
  padding: 30px 34px;
}

body[data-flow="ready"] .free-hero-copy h1,
body[data-flow="report"] .free-hero-copy h1 {
  font-size: clamp(28px, 3.4vw, 42px);
}

body[data-flow="report"] .free-hero-tags {
  display: none;
}

body[data-flow="ready"] .compact-history-panel,
body[data-flow="ready"] .compact-task-panel,
body[data-flow="report"] .compact-history-panel,
body[data-flow="report"] .compact-task-panel {
  padding: 18px;
}

body[data-flow="ready"] .reports-list,
body[data-flow="ready"] .tasks-list,
body[data-flow="report"] .reports-list,
body[data-flow="report"] .tasks-list {
  max-height: 260px;
  overflow: auto;
}

.free-app-body .dashboard {
  display: grid;
  gap: 18px;
}

.free-app-body .overview-panel {
  align-items: center;
}

.free-review-summary {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 179, 118, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.94), rgba(245, 239, 229, 0.88));
}

.free-review-summary::after {
  content: "";
  position: absolute;
  inset: auto 22px 18px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(21, 28, 43, 0.05);
  filter: blur(2px);
  pointer-events: none;
}

.review-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  position: relative;
  z-index: 1;
}

.review-flow-steps span {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quick-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.quick-review-card,
.position-insight-card {
  text-align: left;
  color: var(--text);
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(31, 25, 18, 0.08);
  transform: translateY(8px);
  animation: review-card-in 0.38s ease forwards;
}

.quick-review-card {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 16px;
  border-radius: 22px;
  cursor: pointer;
}

.quick-review-card:hover,
.position-insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(31, 25, 18, 0.13);
}

.quick-review-card span,
.position-insight-card span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-review-card strong,
.position-insight-card strong {
  font-size: 16px;
  line-height: 1.35;
}

.quick-review-card p,
.position-insight-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.review-section-lead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
}

.review-section-lead strong {
  color: var(--text);
}

.review-round-card {
  animation: review-card-in 0.34s ease forwards;
  animation-delay: var(--delay, 0ms);
  opacity: 0;
}

.review-round-card[data-severity="high"] {
  border-color: rgba(166, 62, 53, 0.2);
  background: rgba(166, 62, 53, 0.055);
}

.round-impact {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.55;
}

.round-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.round-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.all-rounds-drawer {
  margin-top: 12px;
  border-top: 1px solid rgba(31, 41, 55, 0.08);
  padding-top: 10px;
}

.all-rounds-drawer summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 800;
}

.all-rounds-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.key-event-summary {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(31, 41, 55, 0.08);
  color: var(--muted);
  line-height: 1.55;
}

.key-event-card {
  grid-template-columns: 1fr;
  align-items: start;
  cursor: pointer;
  animation: review-card-in 0.34s ease forwards;
  animation-delay: var(--delay, 0ms);
  opacity: 0;
}

.key-event-card[data-kind="death"] {
  border-color: rgba(166, 62, 53, 0.18);
  background: rgba(166, 62, 53, 0.055);
}

.key-event-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.key-event-card p,
.key-event-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.key-event-card em {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.position-insights {
  margin: 0 0 14px;
}

.position-insight-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}

.position-insight-head strong {
  color: var(--text);
}

.position-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.position-insight-card {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border-radius: 18px;
}

.utility-readout-rich {
  display: grid;
  grid-template-columns: 1fr;
}

.utility-readout-rich span {
  display: block;
  line-height: 1.5;
}

.utility-readout-rich b {
  display: block;
  color: var(--text);
}

@keyframes review-card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.free-app-body .stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.free-app-body .dashboard-row {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.free-app-body .wide-panel,
.free-app-body .side-panel {
  min-width: 0;
}

.free-app-body .timeline,
.free-app-body .kill-feed,
.free-app-body .utility-events,
.free-app-body .utility-rounds,
.free-app-body .utility-focus {
  max-height: 360px;
  overflow: auto;
}

.free-app-body .map-board {
  min-height: clamp(300px, 31vw, 400px);
}

.free-app-body .map-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.free-app-body .membership-panel {
  align-self: stretch;
}

.free-app-body .membership-panel {
  background:
    linear-gradient(180deg, rgba(32, 31, 29, 0.95), rgba(20, 20, 20, 0.98)),
    radial-gradient(circle at top right, rgba(214, 179, 118, 0.18), transparent 30%);
  color: #f4efe6;
}

.admin-redeem-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 14px;
  margin-bottom: 12px;
  align-items: end;
}

.admin-redeem-form .admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 840px) {
  .admin-redeem-form {
    grid-template-columns: 1fr;
  }
}

.free-app-body .membership-panel .premium-copy,
.free-app-body .membership-panel .feature-card p {
  color: rgba(244, 239, 230, 0.76);
}

.free-app-body .membership-panel .feature-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.free-app-body .membership-panel .premium-card {
  background: rgba(214, 179, 118, 0.12);
}

@media (max-width: 960px) {
  .free-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .free-app-body .stats-grid,
  .free-app-body .dashboard-row,
  .free-app-body .map-meta,
  .quick-review-grid,
  .position-insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .free-topbar,
  .free-account-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .free-hero-copy,
  .free-account-card,
  .free-intro-card,
  .free-upload-panel {
    padding: 22px;
  }

  .free-hero-copy h1 {
    font-size: 32px;
  }
}

@keyframes freeReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Orange dashboard preview refresh. UI only: keeps existing data contracts and IDs intact. */
:root {
  --free-bg: #fff8ef;
  --free-surface: rgba(255, 253, 249, 0.86);
  --free-surface-strong: rgba(255, 255, 255, 0.94);
  --free-border: rgba(214, 97, 18, 0.14);
  --free-text: #211812;
  --free-muted: #7b6e62;
  --free-accent: #dc4f05;
  --free-accent-2: #ff941f;
  --free-accent-soft: #fff0df;
  --free-line: rgba(115, 74, 40, 0.1);
  --free-shadow: 0 22px 56px rgba(124, 64, 18, 0.1);
}

.free-app-body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 132, 27, 0.16), transparent 27%),
    radial-gradient(circle at 88% 4%, rgba(255, 203, 132, 0.18), transparent 25%),
    linear-gradient(180deg, #fffaf3 0%, #fff6eb 48%, #fffaf5 100%);
  color: var(--free-text);
}

.free-app-shell {
  width: min(1500px, calc(100% - 48px));
  padding-top: 18px;
}

.free-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  margin: -18px -24px 18px;
  padding: 14px 24px 12px;
  border-bottom: 1px solid rgba(214, 97, 18, 0.09);
  background: rgba(255, 250, 243, 0.82);
  backdrop-filter: blur(20px);
}

.free-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.free-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background:
    conic-gradient(from 25deg, #ff8a18, #c93e00, #ffb33d, #dd4a02, #ff8a18);
  box-shadow: 0 10px 22px rgba(214, 80, 6, 0.25);
  position: relative;
}

.free-brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 7px;
  background: #fff8ef;
  transform: rotate(18deg);
}

.free-nav {
  gap: clamp(10px, 2.4vw, 34px);
  align-items: center;
}

.free-nav a {
  position: relative;
  padding: 8px 2px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #241c17;
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
}

.free-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--free-accent), var(--free-accent-2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.free-nav a:hover,
.free-nav a:focus-visible,
.free-nav a.is-active {
  color: var(--free-accent);
  transform: none;
  background: transparent;
  box-shadow: none;
}

.free-nav a:hover::after,
.free-nav a:focus-visible::after,
.free-nav a.is-active::after {
  transform: scaleX(1);
}

.free-top-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.free-account-link,
.free-new-analysis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.free-account-link {
  color: #6c3a12;
  border: 1px solid rgba(214, 97, 18, 0.18);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 26px rgba(138, 75, 22, 0.06);
}

.free-new-analysis {
  color: #fff;
  background: linear-gradient(135deg, #f47a0a 0%, #c93b00 58%, #ff9e1c 100%);
  box-shadow: 0 14px 28px rgba(214, 74, 0, 0.26), inset 0 1px rgba(255, 255, 255, 0.32);
}

.free-new-analysis::before {
  content: "+";
  margin-right: 9px;
  font-size: 24px;
  line-height: 1;
}

.free-hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  min-height: 330px;
  gap: 20px;
  margin-bottom: 18px;
}

.free-hero-copy,
.free-hero-side > section,
.free-upload-panel,
.member-entry,
.free-app-body .panel {
  border: 1px solid var(--free-border);
  background: var(--free-surface);
  box-shadow: var(--free-shadow);
  backdrop-filter: blur(18px);
}

.free-hero-copy,
.free-hero-side > section,
.free-app-body .panel {
  border-radius: 22px;
}

.free-hero-copy {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 4vw, 54px);
  justify-content: center;
  background:
    radial-gradient(circle at 75% 48%, rgba(255, 126, 17, 0.18), transparent 25%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 228, 0.82));
}

.free-hero-copy::before {
  content: "";
  position: absolute;
  inset: -20% -8% -10% 45%;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 127, 22, 0.1), transparent 48%),
    radial-gradient(circle at 55% 48%, rgba(255, 147, 33, 0.22), transparent 28%);
  pointer-events: none;
}

.free-hero-copy .eyebrow {
  justify-self: start;
  width: fit-content;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--free-accent);
  background: rgba(255, 139, 31, 0.12);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.free-hero-copy .eyebrow::before {
  content: "♕";
  margin-right: 6px;
  font-size: 12px;
}

.free-hero-copy h1 {
  position: relative;
  z-index: 2;
  max-width: 470px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.free-hero-copy h1 span {
  color: var(--free-accent);
}

.free-hero-text {
  position: relative;
  z-index: 2;
  margin: 18px 0 0;
  color: var(--free-muted);
  font-size: 16px;
}

.free-hero-tags {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 108px));
  gap: 14px;
  margin-top: 30px;
}

.free-hero-tags span {
  min-height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  border-radius: 16px;
  color: #2c2017;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(224, 102, 22, 0.1);
  box-shadow: 0 14px 28px rgba(132, 76, 27, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.free-hero-art {
  position: absolute;
  right: clamp(18px, 5vw, 74px);
  top: 50%;
  width: 290px;
  height: 230px;
  transform: translateY(-50%);
  pointer-events: none;
}

.free-art-ring {
  position: absolute;
  inset: auto 0 0 18px;
  height: 86px;
  border: 1px solid rgba(230, 128, 44, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 12px 30px rgba(222, 109, 16, 0.08), 0 22px 42px rgba(218, 89, 5, 0.12);
}

.free-art-folder {
  position: absolute;
  right: 46px;
  top: 55px;
  width: 170px;
  height: 126px;
  display: grid;
  place-items: center;
  border-radius: 26px 26px 20px 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 36px;
  font-weight: 950;
  letter-spacing: 0.04em;
  background:
    linear-gradient(145deg, rgba(255, 193, 91, 0.8), rgba(236, 87, 4, 0.88)),
    rgba(255, 136, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 26px 50px rgba(218, 84, 3, 0.28), inset 0 6px 18px rgba(255, 255, 255, 0.28);
  transform: rotate(4deg);
}

.free-art-folder::before {
  content: "";
  position: absolute;
  left: 23px;
  top: -23px;
  width: 78px;
  height: 32px;
  border-radius: 18px 18px 8px 8px;
  background: rgba(255, 171, 51, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.free-art-chip {
  position: absolute;
  width: 78px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(239, 132, 42, 0.26);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 18px 36px rgba(218, 84, 3, 0.12);
}

.chip-one {
  right: 34px;
  top: 15px;
  transform: rotate(10deg);
}

.chip-two {
  right: 8px;
  top: 78px;
  transform: rotate(-4deg);
}

.free-hero-side {
  gap: 16px;
}

.free-account-card,
.free-upload-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 238, 0.9));
}

.free-account-card {
  padding: 20px 22px;
}

.free-account-head {
  align-items: center;
}

.free-account-avatar {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  border: 3px solid #fff;
  box-shadow: 0 18px 36px rgba(68, 44, 28, 0.16);
}

.free-account-title h2 {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.free-upload-panel {
  margin: 0 0 18px;
  padding: 20px 22px;
}

.free-upload-field {
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
  border-color: rgba(255, 137, 31, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.94), rgba(255, 246, 235, 0.88));
}

.free-upload-field span {
  font-size: 18px;
  color: #2a211b;
}

.free-upload-actions button,
.free-upload-actions .button-link {
  flex: 1 1 220px;
}

.free-app-body button,
.free-app-body .button-link {
  border-radius: 13px;
}

.free-app-body button:not(.secondary),
.free-app-body .button-link:not(.secondary-link) {
  background: linear-gradient(135deg, #f58112, #ce3f00 72%, #ff9e20);
  box-shadow: 0 12px 26px rgba(212, 72, 3, 0.22);
}

.free-app-body button.secondary,
.free-app-body .secondary-link {
  color: #7e3b06;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(218, 98, 18, 0.18);
}

body[data-flow="ready"] .free-hero,
body[data-flow="report"] .free-hero,
body[data-flow="pick"] .free-hero {
  min-height: auto;
}

body[data-flow="start"] #reports-panel:not(.hidden),
body[data-flow="start"] #tasks-panel:not(.hidden) {
  display: block !important;
}

body[data-flow="ready"] .free-hero-copy,
body[data-flow="report"] .free-hero-copy,
body[data-flow="pick"] .free-hero-copy {
  min-height: 210px;
}

body[data-flow="ready"] .free-hero-art,
body[data-flow="report"] .free-hero-art,
body[data-flow="pick"] .free-hero-art {
  transform: translateY(-50%) scale(0.76);
  transform-origin: center right;
}

.free-app-body .panel {
  padding: 24px;
}

.free-app-body .dashboard {
  gap: 20px;
}

.free-app-body .overview-panel {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  grid-template-columns: minmax(0, 1fr) auto;
  background:
    linear-gradient(92deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 228, 0.86)),
    radial-gradient(circle at 83% 50%, rgba(255, 130, 29, 0.18), transparent 26%);
}

.free-app-body .overview-panel::after {
  content: "CS2";
  position: absolute;
  right: 130px;
  top: 44px;
  color: rgba(222, 88, 7, 0.1);
  font-size: 76px;
  font-weight: 950;
  transform: rotate(-6deg);
}

.score-badge {
  min-width: 132px;
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(222, 88, 7, 0.13);
}

.score-badge strong {
  color: var(--free-accent);
  font-size: 48px;
}

.free-app-body .stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.free-app-body .stat-card,
.free-app-body .ability-card,
.free-app-body .rating-stat-card {
  min-height: 162px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(219, 98, 18, 0.12);
  box-shadow: 0 16px 32px rgba(123, 67, 24, 0.06);
}

.free-app-body .ability-card:hover,
.free-app-body .rating-stat-card:hover,
.free-app-body .stat-card:hover {
  border-color: rgba(222, 88, 7, 0.42);
  transform: translateY(-3px);
}

.free-app-body .stat-value,
.free-app-body .ability-card .stat-value {
  color: #16120f;
  font-size: 30px;
}

.free-review-summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 238, 0.88));
}

.review-flow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.review-flow-steps span {
  position: relative;
  text-align: center;
  color: #9a6d49;
  background: rgba(255, 255, 255, 0.74);
}

.review-flow-steps span:nth-child(2) {
  color: #fff;
  background: linear-gradient(135deg, #ff9025, #d94800);
}

.quick-review-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-review-card,
.position-insight-card,
.review-round-card,
.key-event-card,
.key-event-summary,
.admin-item,
.report-item,
.task-item {
  border-radius: 18px;
  border-color: rgba(218, 98, 18, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.admin-worker-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.admin-worker-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(218, 98, 18, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.admin-worker-card.is-online {
  border-color: rgba(54, 170, 103, 0.24);
}

.admin-worker-card.is-offline {
  border-color: rgba(215, 64, 42, 0.24);
}

.admin-pill.success {
  color: #197444;
  background: rgba(54, 170, 103, 0.12);
}

.admin-pill.danger {
  color: #b83a2c;
  background: rgba(215, 64, 42, 0.12);
}

.quick-review-card {
  min-height: 170px;
  background:
    radial-gradient(circle at 84% 24%, rgba(255, 128, 21, 0.18), transparent 24%),
    rgba(255, 255, 255, 0.84);
}

.quick-review-card span,
.position-insight-card span,
.round-tags span,
.key-event-card em {
  color: var(--free-accent);
  background: rgba(255, 133, 28, 0.09);
}

.free-app-body .dashboard-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 20px;
}

.free-app-body .timeline,
.free-app-body .kill-feed,
.free-app-body .utility-events,
.free-app-body .utility-rounds,
.free-app-body .utility-focus {
  max-height: 470px;
}

.timeline-item,
.kill-item,
.utility-card,
.utility-event-card {
  border-radius: 16px;
  border: 1px solid rgba(218, 98, 18, 0.1);
  background: rgba(255, 255, 255, 0.76);
}

.free-app-body .map-board {
  min-height: 520px;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #171717;
  background-size: 18px 18px, 18px 18px, auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 22px 44px rgba(28, 24, 20, 0.12);
}

.free-app-body .map-meta {
  grid-template-columns: 0.78fr 1fr 0.85fr;
}

.map-meta > div,
.utility-panel,
.utility-focus,
.utility-rounds,
.utility-events {
  border-radius: 18px;
}

.free-app-body .membership-panel {
  background:
    radial-gradient(circle at 83% 24%, rgba(255, 180, 63, 0.2), transparent 24%),
    linear-gradient(135deg, #24201a, #0f0f0f);
  border-color: rgba(255, 174, 63, 0.25);
}

.progress-fill-bar,
.free-app-body .progress-fill {
  background: linear-gradient(90deg, #f78110, #d64700, #ff9f25);
}

@media (max-width: 1180px) {
  .free-hero,
  body[data-flow="ready"] .free-hero,
  body[data-flow="report"] .free-hero {
    grid-template-columns: 1fr;
  }

  .free-hero-art {
    opacity: 0.34;
  }

  .free-app-body .stats-grid,
  .quick-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .free-app-shell {
    width: min(100% - 24px, 1500px);
  }

  .free-topbar {
    align-items: flex-start;
    margin-inline: -12px;
  }

  .free-nav,
  .free-top-actions {
    width: 100%;
  }

  .free-top-actions a {
    flex: 1;
  }

  .free-hero-tags,
  .free-app-body .stats-grid,
  .free-app-body .dashboard-row,
  .free-app-body .map-meta,
  .quick-review-grid,
  .position-insight-grid,
  .review-flow-steps {
    grid-template-columns: 1fr;
  }

  .free-hero-art {
    display: none;
  }
}

/* Split-page free analysis shell. Sections keep their original IDs/data bindings; routing only controls visibility. */
body.free-route-active[data-page="home"] .app-route-section:not([data-route~="home"]),
body.free-route-active[data-page="player"] .app-route-section:not([data-route~="player"]),
body.free-route-active[data-page="reports"] .app-route-section:not([data-route~="reports"]),
body.free-route-active[data-page="review"] .app-route-section:not([data-route~="review"]),
body.free-route-active[data-page="position"] .app-route-section:not([data-route~="position"]),
body.free-route-active[data-page="utility"] .app-route-section:not([data-route~="utility"]),
body.free-route-active[data-page="dynamic"] .app-route-section:not([data-route~="dynamic"]),
body.free-route-active[data-page="official-docs"] .app-route-section:not([data-route~="official-docs"]) {
  display: none !important;
}

body.free-route-active[data-page="home"] #dashboard,
body.free-route-active[data-page="player"] #dashboard,
body.free-route-active[data-page="official-docs"] #dashboard {
  display: none !important;
}

body.free-route-active[data-flow="start"][data-page="review"] #dashboard,
body.free-route-active[data-flow="start"][data-page="position"] #dashboard,
body.free-route-active[data-flow="start"][data-page="utility"] #dashboard,
body.free-route-active[data-flow="start"][data-page="dynamic"] #dashboard,
body.free-route-active[data-flow="ready"][data-page="review"] #dashboard,
body.free-route-active[data-flow="ready"][data-page="position"] #dashboard,
body.free-route-active[data-flow="ready"][data-page="utility"] #dashboard,
body.free-route-active[data-flow="ready"][data-page="dynamic"] #dashboard {
  display: none !important;
}

body.free-route-active[data-flow="pick"] #empty-analysis-page,
body.free-route-active[data-flow="report"] #empty-analysis-page,
body.free-route-active[data-page="reports"] #empty-analysis-page,
body.free-route-active[data-page="home"] #empty-analysis-page {
  display: none !important;
}

body.free-route-active[data-flow="start"][data-page="player"] #empty-analysis-page,
body.free-route-active[data-flow="start"][data-page="review"] #empty-analysis-page,
body.free-route-active[data-flow="start"][data-page="position"] #empty-analysis-page,
body.free-route-active[data-flow="start"][data-page="utility"] #empty-analysis-page,
body.free-route-active[data-flow="start"][data-page="dynamic"] #empty-analysis-page,
body.free-route-active[data-flow="ready"][data-page="player"] #empty-analysis-page,
body.free-route-active[data-flow="ready"][data-page="review"] #empty-analysis-page,
body.free-route-active[data-flow="ready"][data-page="position"] #empty-analysis-page,
body.free-route-active[data-flow="ready"][data-page="utility"] #empty-analysis-page,
body.free-route-active[data-flow="ready"][data-page="dynamic"] #empty-analysis-page {
  display: flex !important;
}

body.free-route-active[data-page="reports"][data-flow="report"] #reports-panel {
  display: none !important;
}

body.free-route-active[data-page="reports"] #dashboard,
body.free-route-active[data-page="review"] #dashboard,
body.free-route-active[data-page="position"] #dashboard,
body.free-route-active[data-page="utility"] #dashboard,
body.free-route-active[data-page="dynamic"] #dashboard {
  display: grid;
}

.route-position-page,
.route-utility-page,
.route-dynamic-page {
  grid-template-columns: 1fr !important;
}

.route-position-page .wide-panel,
.route-utility-page .wide-panel,
.route-dynamic-page .wide-panel {
  min-width: 0;
}

body.free-route-active[data-page="position"] .map-board {
  min-height: min(68vh, 680px);
}

body.free-route-active[data-page="utility"] .utility-panel {
  display: grid;
  gap: 18px;
}

body.free-route-active[data-page="utility"] .utility-focus,
body.free-route-active[data-page="utility"] .utility-rounds,
body.free-route-active[data-page="utility"] .utility-events {
  max-height: none;
}

.official-docs-panel {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgba(251, 146, 60, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.88));
}

.official-docs-hero {
  position: relative;
  display: grid;
  gap: 12px;
  max-width: 980px;
}

.official-docs-hero h2 {
  margin: 0;
  color: #17120f;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.official-docs-hero span {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 237, 213, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.22);
}

.official-docs-hero p {
  margin: 0;
  max-width: 860px;
  color: #6b5b51;
  font-size: 16px;
  line-height: 1.8;
}

.official-docs-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.8);
  border: 1px solid rgba(251, 146, 60, 0.18);
}

.official-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.official-doc-card {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(231, 214, 199, 0.86);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.07);
}

.official-doc-card-wide {
  grid-column: span 3;
}

.official-doc-card strong {
  color: #241c17;
  font-size: 18px;
}

.official-doc-card p,
.official-doc-card li {
  margin: 0;
  color: #6f6258;
  line-height: 1.72;
}

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

.official-docs-columns b {
  display: block;
  margin-bottom: 8px;
  color: #c2410c;
}

.official-docs-columns ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.official-doc-warning {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.92), rgba(255, 241, 242, 0.78));
}

.official-docs-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.official-docs-footer > div {
  padding: 18px;
  border-radius: 22px;
  background: rgba(30, 22, 16, 0.92);
  color: #fff7ed;
}

.official-docs-footer strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.official-docs-footer p {
  margin: 0;
  color: rgba(255, 247, 237, 0.76);
  line-height: 1.7;
}

.official-docs-footer a {
  color: #fed7aa;
  font-weight: 800;
}

.dynamic-replay-panel {
  display: grid;
  gap: 18px;
}

.dynamic-replay-head {
  align-items: flex-start;
  gap: 18px;
}

.dynamic-replay-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.dynamic-replay-controls-bottom {
  justify-content: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(226, 123, 26, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(249, 115, 22, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.dynamic-replay-field {
  min-width: 150px;
}

.dynamic-mode-field {
  min-width: 138px;
}

.dynamic-mode-buttons {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(226, 123, 26, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.dynamic-mode-buttons > span {
  padding: 0 4px;
  color: #8b5a2b;
  font-size: 12px;
  font-weight: 900;
}

.dynamic-mode-buttons button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(234, 88, 12, 0.16);
  border-radius: 12px;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: none;
  cursor: pointer;
}

.dynamic-mode-buttons button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f97316, #c43d00);
  box-shadow: 0 10px 22px rgba(218, 82, 8, 0.18);
}

.dynamic-mode-buttons button:disabled,
.dynamic-mode-buttons button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.46;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.dynamic-replay-controls button {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #f97316, #c43d00);
  box-shadow: 0 16px 32px rgba(218, 82, 8, 0.22);
}

.dynamic-replay-controls .ghost-btn {
  color: #9a3412;
  border: 1px solid rgba(234, 88, 12, 0.22);
  background: rgba(255, 250, 244, 0.86);
  box-shadow: none;
}

.dynamic-layer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 123, 26, 0.14);
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.76);
}

.dynamic-layer-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
}

.dynamic-layer-toolbar input {
  accent-color: #ea580c;
}

.dynamic-replay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: stretch;
}

.dynamic-map-wrap {
  min-width: 0;
}

.dynamic-map-viewport {
  position: relative;
  min-height: min(70vh, 680px);
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  touch-action: none;
}

.dynamic-map-board {
  position: relative;
  width: 100%;
  min-height: min(70vh, 680px) !important;
  overflow: hidden;
  transform-origin: 50% 50%;
  transition: transform 120ms ease;
  cursor: grab;
}

.dynamic-map-board.is-dragging {
  cursor: grabbing;
  transition: none;
}

.dynamic-trail-lines,
.dynamic-utility-layer,
.dynamic-observation-layer,
.dynamic-kill-lines,
.dynamic-event-layer,
.dynamic-actor-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.dynamic-utility-layer {
  z-index: 4;
}

.dynamic-trail-lines {
  z-index: 5;
}

.dynamic-observation-layer {
  z-index: 6;
}

.dynamic-kill-lines {
  z-index: 7;
}

.dynamic-event-layer {
  z-index: 8;
}

.dynamic-actor-layer {
  z-index: 9;
}

.dynamic-target-trail {
  fill: none;
  stroke: #ff7a18;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 125, 24, 0.55));
}

.dynamic-team-trail {
  fill: none;
  stroke: rgba(59, 130, 246, 0.72);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dynamic-enemy-trail {
  fill: none;
  stroke: rgba(239, 68, 68, 0.62);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2 2;
}

.dynamic-view-cone {
  fill: rgba(249, 115, 22, 0.18);
  stroke: rgba(255, 186, 109, 0.62);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.3));
}

.dynamic-view-cone.is-teammate {
  fill: rgba(59, 130, 246, 0.14);
  stroke: rgba(147, 197, 253, 0.5);
}

.dynamic-view-cone.is-enemy {
  fill: rgba(239, 68, 68, 0.11);
  stroke: rgba(248, 113, 113, 0.5);
}

.dynamic-blind-zone {
  fill: rgba(15, 23, 42, 0.34);
  stroke: rgba(15, 23, 42, 0.34);
  stroke-dasharray: 1.8 1.8;
  stroke-width: 0.25;
}

.dynamic-utility-area {
  fill: rgba(148, 163, 184, 0.26);
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.28;
}

.dynamic-utility-area.is-smoke {
  fill: rgba(148, 163, 184, 0.34);
  stroke: rgba(226, 232, 240, 0.74);
}

.dynamic-utility-area.is-fire {
  fill: rgba(249, 115, 22, 0.26);
  stroke: rgba(251, 146, 60, 0.82);
}

.dynamic-utility-area.is-flash {
  fill: rgba(250, 204, 21, 0.18);
  stroke: rgba(250, 204, 21, 0.7);
}

.dynamic-utility-area.is-he {
  fill: rgba(239, 68, 68, 0.2);
  stroke: rgba(248, 113, 113, 0.78);
}

.dynamic-utility-area.is-decoy {
  fill: rgba(56, 189, 248, 0.16);
  stroke: rgba(125, 211, 252, 0.7);
  stroke-dasharray: 1.2 1.2;
}

.dynamic-kill-line {
  stroke: rgba(239, 68, 68, 0.8);
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-dasharray: 1.5 1.5;
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.35));
}

.dynamic-actor-dot,
.dynamic-event-marker {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.dynamic-actor-dot {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: #64748b;
  pointer-events: auto;
  cursor: help;
  transition: left 140ms linear, top 140ms linear, opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  will-change: left, top, opacity, transform;
}

.dynamic-actor-dot:hover {
  transform: translate(-50%, -50%) scale(1.12);
  z-index: 20;
}

.dynamic-actor-dot.is-stale {
  opacity: 0.48;
  filter: grayscale(0.35);
}

.dynamic-actor-arrow {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 11px solid rgba(255, 255, 255, 0.95);
  transform: translateX(-50%);
  transform-origin: 50% 22px;
}

.dynamic-actor-dot.is-target {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #fb923c, #dc2626);
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.16), 0 12px 28px rgba(194, 65, 12, 0.42);
}

.dynamic-actor-dot.is-teammate.is-t,
.dynamic-actor-dot.is-t {
  background: linear-gradient(135deg, #f97316, #b45309);
}

.dynamic-actor-dot.is-teammate.is-ct,
.dynamic-actor-dot.is-ct {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.dynamic-actor-dot.is-enemy {
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
}

.dynamic-actor-dot.is-enemy.is-pov-visible {
  box-shadow:
    0 0 0 7px rgba(239, 68, 68, 0.22),
    0 0 22px rgba(248, 113, 113, 0.65),
    0 10px 24px rgba(127, 29, 29, 0.42);
}

.dynamic-event-marker {
  z-index: 7;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(15, 23, 42, 0.78);
  opacity: 0.78;
}

.dynamic-event-marker.is-active {
  opacity: 1;
  background: linear-gradient(135deg, #facc15, #f97316);
  animation: dynamicPulse 900ms ease-in-out infinite alternate;
}

.dynamic-event-marker.is-kill,
.dynamic-event-marker.is-death {
  background: linear-gradient(135deg, #ef4444, #991b1b);
}

.dynamic-event-marker.is-plant,
.dynamic-event-marker.is-defuse,
.dynamic-event-marker.is-explode {
  background: linear-gradient(135deg, #f59e0b, #c2410c);
}

.dynamic-event-marker.is-smoke {
  background: linear-gradient(135deg, #94a3b8, #475569);
}

.dynamic-event-marker.is-flash {
  color: #78350f;
  background: linear-gradient(135deg, #fef08a, #facc15);
}

.dynamic-event-marker.is-fire,
.dynamic-event-marker.is-molotov,
.dynamic-event-marker.is-incendiary {
  background: linear-gradient(135deg, #fb923c, #dc2626);
}

.dynamic-event-marker.is-he {
  background: linear-gradient(135deg, #f87171, #991b1b);
}

.dynamic-event-marker.is-decoy {
  background: linear-gradient(135deg, #7dd3fc, #0369a1);
}

.dynamic-hover-card {
  position: absolute;
  z-index: 25;
  min-width: 220px;
  max-width: 280px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.36);
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.dynamic-hover-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.dynamic-hover-card span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.7;
}

.dynamic-zoom-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 30;
  display: grid;
  gap: 8px;
}

.dynamic-zoom-controls button {
  min-width: 40px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

@keyframes dynamicPulse {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.16); }
}

.dynamic-side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.dynamic-side-panel > div {
  padding: 16px;
  border: 1px solid rgba(226, 123, 26, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dynamic-time-card {
  background:
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 249, 240, 0.96), rgba(255, 255, 255, 0.82)) !important;
}

.dynamic-time-card span,
.dynamic-side-panel h4 {
  margin: 0 0 8px;
  color: #9a5a1f;
  font-size: 13px;
  font-weight: 900;
}

.dynamic-time-card strong {
  display: block;
  color: #111827;
  font-size: 38px;
  line-height: 1.05;
}

.dynamic-time-card small {
  color: var(--free-muted);
}

.dynamic-coach-panel {
  min-height: 100%;
}

.dynamic-coach-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at 90% 8%, rgba(249, 115, 22, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(255, 252, 247, 0.96), rgba(255, 255, 255, 0.82)) !important;
}

.dynamic-coach-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.dynamic-coach-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
}

.dynamic-coach-header span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 237, 213, 0.8);
}

.dynamic-ai-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(234, 88, 12, 0.24);
  border-radius: 999px;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 247, 237, 0.92);
  box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08);
  cursor: pointer;
}

.dynamic-ai-toggle input {
  appearance: none;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: rgba(154, 91, 40, 0.22);
  position: relative;
  transition: background 0.18s ease;
}

.dynamic-ai-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(92, 45, 10, 0.22);
  transition: transform 0.18s ease;
}

.dynamic-ai-toggle input:checked {
  background: linear-gradient(135deg, #f97316, #c43d00);
}

.dynamic-ai-toggle input:checked::after {
  transform: translateX(16px);
}

.dynamic-coach-header h4 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

.dynamic-coach-header strong {
  color: #ea580c;
  font-size: 34px;
  line-height: 1;
}

.dynamic-ai-analysis {
  display: grid;
  gap: 10px;
}

.dynamic-ai-card {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid rgba(226, 123, 26, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(154, 52, 18, 0.06);
}

.dynamic-ai-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dynamic-ai-card-top span {
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.dynamic-ai-card-top small {
  color: #a16207;
  font-size: 11px;
  font-weight: 900;
}

.dynamic-ai-watch {
  border-style: dashed;
}

.dynamic-ai-progress {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(154, 52, 18, 0.09);
}

.dynamic-ai-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb923c, #c2410c);
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.28);
}

.dynamic-ai-progress.is-loading span {
  width: 36%;
  animation: dynamicCoachLoading 1.35s ease-in-out infinite;
}

@keyframes dynamicCoachLoading {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.dynamic-live-comment {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dynamic-live-comment:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(154, 52, 18, 0.1);
}

.dynamic-live-comment.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.dynamic-ai-detail {
  border-style: dashed;
}

.dynamic-ai-card strong {
  color: #111827;
  font-size: 14px;
}

.dynamic-ai-card p {
  margin: 0;
  color: #6b5b4c;
  font-size: 13px;
  line-height: 1.65;
}

.dynamic-ai-card small {
  color: #9a5a1f;
  font-weight: 800;
}

.dynamic-ai-card.is-high {
  border-color: rgba(220, 38, 38, 0.28);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.88), rgba(255, 255, 255, 0.82));
}

.dynamic-ai-card.is-medium {
  border-color: rgba(249, 115, 22, 0.25);
}

.dynamic-coach-evidence {
  margin-top: auto;
  padding-top: 4px;
}

.dynamic-coach-evidence summary {
  cursor: pointer;
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.dynamic-coach-evidence .dynamic-event-list {
  margin-top: 10px;
  max-height: 250px;
}

.dynamic-event-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.dynamic-event-item {
  display: grid;
  grid-template-columns: 54px minmax(54px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(226, 123, 26, 0.12);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 252, 247, 0.82);
}

.dynamic-event-item.is-current {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(255, 237, 213, 0.75);
}

.dynamic-event-item:hover {
  border-color: rgba(234, 88, 12, 0.34);
  transform: translateY(-1px);
}

.dynamic-event-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dynamic-event-actions button {
  padding: 5px 8px;
  border: 1px solid rgba(226, 123, 26, 0.18);
  border-radius: 999px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255, 247, 237, 0.84);
}

.dynamic-layer-status {
  display: grid;
  gap: 8px;
  color: var(--free-muted);
  font-size: 12px;
  line-height: 1.6;
}

.dynamic-layer-status strong {
  color: #7c2d12;
}

.dynamic-event-item span {
  color: #c2410c;
  font-weight: 900;
}

.dynamic-event-item strong {
  color: #111827;
}

.dynamic-event-item small {
  color: var(--free-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dynamic-timeline {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 123, 26, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.dynamic-timeline input[type="range"] {
  width: 100%;
  accent-color: #ea580c;
}

.dynamic-timeline-markers {
  position: relative;
  height: 18px;
}

.dynamic-timeline-marker {
  position: absolute;
  top: 1px;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 4px 10px rgba(194, 65, 12, 0.22);
  transform: translateX(-50%);
  cursor: pointer;
}

.dynamic-replay-empty {
  padding: 18px 20px;
  border: 1px dashed rgba(226, 123, 26, 0.3);
  border-radius: 18px;
  background: rgba(255, 248, 236, 0.74);
}

@media (max-width: 980px) {
  .official-docs-grid,
  .official-docs-columns,
  .official-docs-footer {
    grid-template-columns: 1fr;
  }

  .official-doc-card-wide {
    grid-column: auto;
  }

  .dynamic-replay-layout {
    grid-template-columns: 1fr;
  }
}

body.free-route-active[data-page="review"] .free-review-summary {
  margin-bottom: 0;
}

.empty-analysis-page {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 84% 28%, rgba(255, 129, 25, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 235, 0.9));
}

.empty-analysis-page::after {
  content: "CS2";
  position: absolute;
  right: 72px;
  bottom: 28px;
  color: rgba(221, 83, 6, 0.08);
  font-size: clamp(80px, 12vw, 168px);
  font-weight: 950;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.empty-analysis-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.empty-analysis-copy h2 {
  margin: 6px 0 12px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.empty-analysis-page .button-link {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

body:not(.free-motion-replay) .free-topbar,
body:not(.free-motion-replay) .free-hero-copy,
body:not(.free-motion-replay) .free-hero-side {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}

/* Home dashboard layout inspired by the product mockup.
   The upload, report and task IDs stay unchanged so the analysis flow remains stable. */
body.free-route-active[data-page="home"] .free-app-shell {
  width: min(1520px, calc(100% - 48px));
  display: grid;
  grid-template-columns: minmax(520px, 1.48fr) minmax(260px, 0.56fr) minmax(360px, 0.95fr);
  grid-auto-rows: auto;
  gap: 18px 20px;
  align-items: stretch;
}

body.free-route-active[data-page="home"] .free-topbar {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

body.free-route-active[data-page="home"] .free-hero {
  display: contents;
}

body.free-route-active[data-page="home"] .free-hero-copy {
  grid-column: 1;
  grid-row: 2;
  min-height: 330px !important;
}

body.free-route-active[data-page="home"] .free-hero-side {
  display: contents;
}

body.free-route-active[data-page="home"] .free-account-card {
  grid-column: 2;
  grid-row: 2;
  min-height: 330px;
}

body.free-route-active[data-page="home"] #reports-panel {
  grid-column: 3;
  grid-row: 2;
  min-height: 330px;
}

body.free-route-active[data-page="home"] .free-upload-panel {
  grid-column: 1 / 3;
  grid-row: 3;
  min-height: 230px;
  margin: 0;
}

body.free-route-active[data-page="home"] #tasks-panel {
  grid-column: 3;
  grid-row: 3;
  min-height: 230px;
}

body.free-route-active[data-page="home"] .home-trend-card {
  grid-column: 1;
  grid-row: 4;
  min-height: 170px;
}

body.free-route-active[data-page="home"] .member-entry {
  grid-column: 2 / 4;
  grid-row: 4;
  min-height: 170px;
}

body.free-route-active[data-page="home"] .free-hero-copy,
body.free-route-active[data-page="home"] .free-account-card,
body.free-route-active[data-page="home"] #reports-panel,
body.free-route-active[data-page="home"] .free-upload-panel,
body.free-route-active[data-page="home"] #tasks-panel,
body.free-route-active[data-page="home"] .home-trend-card,
body.free-route-active[data-page="home"] .member-entry {
  height: 100%;
}

body.free-route-active[data-page="home"] .free-hero-copy h1 {
  max-width: 450px;
  font-size: clamp(40px, 4.2vw, 64px);
}

body.free-route-active[data-page="home"] .free-hero-art {
  display: block;
  right: clamp(8px, 3.2vw, 54px);
  transform: translateY(-50%) scale(0.92) !important;
}

body.free-route-active[data-page="home"] .free-hero-tags {
  grid-template-columns: repeat(4, minmax(70px, 96px));
}

body.free-route-active[data-page="home"] .free-hero-tags span {
  min-height: 64px;
  font-size: 12px;
}

body.free-route-active[data-page="home"] .free-account-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

body.free-route-active[data-page="home"] .free-account-head {
  display: grid;
  gap: 16px;
}

body.free-route-active[data-page="home"] .free-account-title {
  align-items: center;
}

body.free-route-active[data-page="home"] .free-account-head .button-link {
  width: 100%;
}

body.free-route-active[data-page="home"] #reports-panel .section-head,
body.free-route-active[data-page="home"] #tasks-panel .section-head,
body.free-route-active[data-page="home"] .home-trend-card .section-head {
  margin-bottom: 14px;
}

body.free-route-active[data-page="home"] #reports-panel .button-link,
body.free-route-active[data-page="home"] #tasks-panel .button-link {
  min-height: auto;
  padding: 8px 10px;
  font-size: 12px;
}

body.free-route-active[data-page="home"] .reports-list,
body.free-route-active[data-page="home"] .tasks-list {
  max-height: 245px;
  overflow: auto;
  padding-right: 2px;
}

body.free-route-active[data-page="home"] .report-item,
body.free-route-active[data-page="home"] .task-item {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 13px 14px;
  border-radius: 16px;
}

body.free-route-active[data-page="home"] .report-item .report-actions {
  display: none;
}

body.free-route-active[data-page="home"] .free-upload-panel .section-head {
  align-items: flex-start;
}

body.free-route-active[data-page="home"] .free-upload-form {
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: stretch;
}

body.free-route-active[data-page="home"] .free-upload-field,
body.free-route-active[data-page="home"] .progress-shell {
  grid-column: 1;
}

body.free-route-active[data-page="home"] .free-upload-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  align-content: center;
}

body.free-route-active[data-page="home"] .free-upload-actions button,
body.free-route-active[data-page="home"] .free-upload-actions .button-link {
  width: 100%;
}

.home-trend-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(116px, 0.7fr)) minmax(180px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.home-trend-content article {
  border: 1px solid rgba(218, 98, 18, 0.12);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.home-trend-content span,
.home-trend-content small {
  display: block;
  color: var(--free-muted);
  font-size: 12px;
}

.home-trend-content strong {
  display: block;
  margin: 8px 0 6px;
  color: #261b13;
  font-size: 26px;
  line-height: 1;
}

.home-trend-chart {
  position: relative;
  min-height: 204px;
  border: 1px solid rgba(218, 98, 18, 0.1);
  border-radius: 16px;
  overflow: hidden;
  padding: 12px;
  background:
    linear-gradient(to top, rgba(218, 98, 18, 0.07), transparent),
    repeating-linear-gradient(to right, transparent 0 38px, rgba(91, 63, 37, 0.05) 39px 40px);
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  gap: 8px;
}

.home-trend-chart .empty {
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--free-muted);
  text-align: center;
  padding: 14px;
}

.home-trend-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e65400;
  box-shadow: 0 0 0 5px rgba(230, 84, 0, 0.12);
  transform: translate(-50%, 50%);
}

.home-trend-dot i {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: #c34700;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.home-trend-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(218, 98, 18, 0.1);
}

.home-trend-status span {
  color: var(--free-muted);
  font-size: 11px;
}

.home-trend-status strong {
  display: block;
  margin-top: 2px;
  color: #22150c;
  font-size: 15px;
  line-height: 1.2;
}

.home-trend-status b {
  display: inline-grid;
  min-width: 58px;
  place-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: #d34a00;
  background: rgba(245, 106, 0, 0.1);
  font-size: 14px;
}

.home-trend-status.home-trend-up b {
  color: #0f9a57;
  background: rgba(15, 154, 87, 0.1);
}

.home-trend-status.home-trend-down b {
  color: #d23b2d;
  background: rgba(210, 59, 45, 0.1);
}

.home-trend-visual {
  position: relative;
  min-height: 126px;
}

.home-trend-svg {
  width: 100%;
  height: 100%;
  min-height: 126px;
  display: block;
  overflow: visible;
}

.home-trend-grid-line {
  stroke: rgba(95, 62, 36, 0.12);
  stroke-width: 1;
}

.home-trend-reference {
  stroke: rgba(48, 36, 26, 0.28);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.home-trend-area {
  fill: url(#home-trend-area-gradient);
}

.home-trend-line {
  fill: none;
  stroke: #e65400;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 12px rgba(230, 84, 0, 0.18));
}

.home-trend-point circle {
  fill: #fffaf4;
  stroke: #e65400;
  stroke-width: 3;
}

.home-trend-point.is-latest circle {
  fill: #e65400;
  stroke: #fff7ef;
  filter: drop-shadow(0 6px 10px rgba(230, 84, 0, 0.28));
}

.home-trend-point text {
  fill: #a64000;
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 250, 244, 0.92);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.home-trend-axis-label,
.home-trend-date,
.home-trend-average-label {
  fill: rgba(72, 54, 39, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.home-trend-average-label {
  fill: rgba(72, 54, 39, 0.68);
}

.home-trend-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.home-trend-kpis span {
  border-radius: 12px;
  padding: 8px 9px;
  color: #5d412d;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(218, 98, 18, 0.08);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

body.free-route-active[data-page="home"] .member-entry {
  position: relative;
  overflow: hidden;
  color: #fff6e6;
  border-color: rgba(255, 178, 76, 0.26);
  background:
    radial-gradient(circle at 82% 30%, rgba(255, 173, 52, 0.34), transparent 22%),
    linear-gradient(135deg, #1d160f 0%, #342212 58%, #0e0d0b 100%);
}

body.free-route-active[data-page="home"] .member-entry::after {
  content: "♛";
  position: absolute;
  right: 36px;
  top: 28px;
  color: rgba(255, 186, 80, 0.38);
  font-size: 94px;
  line-height: 1;
}

body.free-route-active[data-page="home"] .member-entry .eyebrow,
body.free-route-active[data-page="home"] .member-entry .hint {
  color: rgba(255, 236, 204, 0.72);
}

body.free-route-active[data-page="home"] .member-entry h3,
body.free-route-active[data-page="home"] .member-entry strong {
  color: #fff7e8;
}

body.free-route-active[data-page="home"] .member-entry .section-head,
body.free-route-active[data-page="home"] .member-entry .feature-split {
  position: relative;
  z-index: 1;
}

body.free-route-active[data-page="home"] .member-entry .feature-split {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

body.free-route-active[data-page="home"] .member-entry .feature-card {
  border-color: rgba(255, 193, 105, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

body.free-route-active[data-page="home"] .member-entry .premium-card {
  border-color: rgba(255, 173, 65, 0.46);
  background: rgba(255, 142, 22, 0.1);
}

body.free-route-active[data-page="home"] .member-entry .button-link {
  color: #fff;
  border: 1px solid rgba(255, 199, 119, 0.22);
}

@media (max-width: 1180px) {
  body.free-route-active[data-page="home"] .free-app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  }

  body.free-route-active[data-page="home"] .free-hero-copy,
  body.free-route-active[data-page="home"] .free-upload-panel,
  body.free-route-active[data-page="home"] .home-trend-card {
    grid-column: 1;
  }

  body.free-route-active[data-page="home"] .free-account-card,
  body.free-route-active[data-page="home"] #reports-panel,
  body.free-route-active[data-page="home"] #tasks-panel,
  body.free-route-active[data-page="home"] .member-entry {
    grid-column: 2;
  }

  body.free-route-active[data-page="home"] .free-account-card { grid-row: 2; }
  body.free-route-active[data-page="home"] #reports-panel { grid-row: 3; }
  body.free-route-active[data-page="home"] .free-upload-panel { grid-row: 4; }
  body.free-route-active[data-page="home"] #tasks-panel { grid-row: 4; }
  body.free-route-active[data-page="home"] .home-trend-card { grid-row: 5; }
  body.free-route-active[data-page="home"] .member-entry { grid-row: 5; }

  body.free-route-active[data-page="home"] .home-trend-content {
    grid-template-columns: repeat(3, 1fr);
  }

  body.free-route-active[data-page="home"] .home-trend-chart {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body.free-route-active[data-page="home"] .free-app-shell {
    width: min(100% - 22px, 100%);
    display: block;
  }

  body.free-route-active[data-page="home"] .free-hero {
    display: grid;
  }

  body.free-route-active[data-page="home"] .free-hero-side {
    display: grid;
  }

  body.free-route-active[data-page="home"] .free-hero-copy,
  body.free-route-active[data-page="home"] .free-account-card,
  body.free-route-active[data-page="home"] #reports-panel,
  body.free-route-active[data-page="home"] .free-upload-panel,
  body.free-route-active[data-page="home"] #tasks-panel,
  body.free-route-active[data-page="home"] .home-trend-card,
  body.free-route-active[data-page="home"] .member-entry {
    min-height: 0;
    margin-bottom: 16px;
  }

  body.free-route-active[data-page="home"] .free-upload-form,
  body.free-route-active[data-page="home"] .home-trend-content,
  body.free-route-active[data-page="home"] .member-entry .feature-split {
    grid-template-columns: 1fr;
  }

  body.free-route-active[data-page="home"] .free-upload-actions,
  body.free-route-active[data-page="home"] .free-upload-field,
  body.free-route-active[data-page="home"] .progress-shell {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Local preview: premium entrance motion for the free analysis page.
   Pure transform/opacity animations keep upload and analysis logic untouched. */
@keyframes freePremiumRise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes freePremiumDrop {
  from {
    opacity: 0;
    transform: translate3d(0, -18px, 0);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes freeTitleImpact {
  0% {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.94);
    filter: blur(10px);
  }
  62% {
    opacity: 1;
    transform: translate3d(0, -3px, 0) scale(1.018);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes freeSoftFloat {
  from { transform: translateY(-50%) translate3d(0, 10px, 0) rotate(-1.5deg); }
  to { transform: translateY(-50%) translate3d(0, -8px, 0) rotate(1.5deg); }
}

@keyframes freeUploadBreath {
  0%, 100% {
    border-color: rgba(218, 98, 18, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 12px 36px rgba(236, 107, 14, 0.06);
  }
  50% {
    border-color: rgba(246, 132, 27, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 244, 229, 0.95), 0 18px 48px rgba(236, 107, 14, 0.16);
  }
}

@keyframes freeButtonSweep {
  0% {
    opacity: 0;
    transform: translate3d(-120%, 0, 0) skewX(-18deg);
  }
  18% {
    opacity: 0.75;
  }
  78% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
    transform: translate3d(330%, 0, 0) skewX(-18deg);
  }
}

@keyframes freeTrendDraw {
  from {
    stroke-dashoffset: 720;
    opacity: 0.45;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.free-motion-replay .free-topbar {
    animation: freePremiumDrop 560ms cubic-bezier(0.18, 0.82, 0.22, 1) both !important;
  }

  body.free-motion-replay .free-nav a,
  body.free-motion-replay .free-top-actions a {
    animation: freePremiumDrop 520ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
  }

  body.free-motion-replay .free-nav a:nth-child(1) { animation-delay: 70ms; }
  body.free-motion-replay .free-nav a:nth-child(2) { animation-delay: 105ms; }
  body.free-motion-replay .free-nav a:nth-child(3) { animation-delay: 140ms; }
  body.free-motion-replay .free-nav a:nth-child(4) { animation-delay: 175ms; }
  body.free-motion-replay .free-nav a:nth-child(5) { animation-delay: 210ms; }
  body.free-motion-replay .free-nav a:nth-child(6) { animation-delay: 245ms; }
  body.free-motion-replay .free-nav a:nth-child(7) { animation-delay: 280ms; }
  body.free-motion-replay .free-top-actions a:nth-child(1) { animation-delay: 210ms; }
  body.free-motion-replay .free-top-actions a:nth-child(2) { animation-delay: 255ms; }

  body.free-motion-replay[data-page="home"] .free-hero-copy,
  body.free-motion-replay[data-page="home"] .free-account-card,
  body.free-motion-replay[data-page="home"] #reports-panel,
  body.free-motion-replay[data-page="home"] .free-upload-panel,
  body.free-motion-replay[data-page="home"] #tasks-panel,
  body.free-motion-replay[data-page="home"] .home-trend-card,
  body.free-motion-replay[data-page="home"] .member-entry {
    animation: freePremiumRise 680ms cubic-bezier(0.16, 0.82, 0.2, 1) both;
  }

  body.free-motion-replay[data-page="home"] .free-hero-copy { animation-delay: 80ms; }
  body.free-motion-replay[data-page="home"] .free-account-card { animation-delay: 150ms; }
  body.free-motion-replay[data-page="home"] #reports-panel { animation-delay: 220ms; }
  body.free-motion-replay[data-page="home"] .free-upload-panel { animation-delay: 290ms; }
  body.free-motion-replay[data-page="home"] #tasks-panel { animation-delay: 360ms; }
  body.free-motion-replay[data-page="home"] .home-trend-card { animation-delay: 430ms; }
  body.free-motion-replay[data-page="home"] .member-entry { animation-delay: 500ms; }

  body.free-motion-replay[data-page="home"] .free-hero-copy .eyebrow,
  body.free-motion-replay[data-page="home"] .free-hero-text {
    animation: freePremiumRise 540ms cubic-bezier(0.2, 0.78, 0.22, 1) both;
  }

  body.free-motion-replay[data-page="home"] .free-hero-copy .eyebrow { animation-delay: 190ms; }
  body.free-motion-replay[data-page="home"] .free-hero-text { animation-delay: 380ms; }

  body.free-motion-replay[data-page="home"] .free-hero-copy h1 {
    animation: freeTitleImpact 760ms cubic-bezier(0.16, 0.85, 0.18, 1) 260ms both;
    will-change: transform, opacity, filter;
  }

  body.free-motion-replay[data-page="home"] .free-hero-tags span {
    animation: freePremiumRise 520ms cubic-bezier(0.2, 0.78, 0.22, 1) both;
  }

  body.free-motion-replay[data-page="home"] .free-hero-tags span:nth-child(1) { animation-delay: 460ms; }
  body.free-motion-replay[data-page="home"] .free-hero-tags span:nth-child(2) { animation-delay: 510ms; }
  body.free-motion-replay[data-page="home"] .free-hero-tags span:nth-child(3) { animation-delay: 560ms; }
  body.free-motion-replay[data-page="home"] .free-hero-tags span:nth-child(4) { animation-delay: 610ms; }

  body.free-motion-replay[data-page="home"] .free-hero-art {
    animation: freeSoftFloat 4.8s ease-in-out 700ms infinite alternate;
    will-change: transform;
  }

  .free-upload-field {
    position: relative;
    overflow: hidden;
  }

  body.free-motion-replay[data-page="home"] .free-upload-field {
    animation: freeUploadBreath 2.8s ease-in-out 850ms infinite;
  }

  .free-upload-actions button,
  .free-upload-actions .button-link,
  .free-new-analysis,
  .member-entry .button-link {
    position: relative;
    overflow: hidden;
  }

  .free-upload-actions button::after,
  .free-upload-actions .button-link::after,
  .free-new-analysis::after,
  .member-entry .button-link::after {
    content: "";
    position: absolute;
    inset: -45% auto -45% -76%;
    width: 58%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
    pointer-events: none;
    opacity: 0;
  }

  body.free-motion-replay .free-upload-actions button::after,
  body.free-motion-replay .free-upload-actions .button-link::after,
  body.free-motion-replay .free-new-analysis::after,
  body.free-motion-replay .member-entry .button-link::after {
    animation: freeButtonSweep 1150ms cubic-bezier(0.22, 0.72, 0.26, 1) 720ms both;
  }

  body.free-motion-replay #empty-analysis-page {
    animation: freePremiumRise 620ms cubic-bezier(0.16, 0.82, 0.2, 1) both;
  }

  body.free-motion-replay #empty-analysis-page::after {
    animation: freeTitleImpact 760ms cubic-bezier(0.16, 0.85, 0.18, 1) 160ms both;
  }

  body.free-motion-replay #empty-analysis-page .empty-analysis-copy {
    animation: freePremiumRise 560ms cubic-bezier(0.2, 0.78, 0.22, 1) 120ms both;
  }

  body.free-motion-replay #empty-analysis-page .button-link {
    animation: freePremiumRise 560ms cubic-bezier(0.2, 0.78, 0.22, 1) 240ms both;
  }

  body.free-motion-replay[data-flow="report"] #dashboard .overview-panel,
  body.free-motion-replay[data-flow="report"] #free-review-summary,
  body.free-motion-replay[data-flow="report"] .dashboard-row,
  body.free-motion-replay[data-flow="report"] .map-panel,
  body.free-motion-replay[data-flow="report"] .utility-panel,
  body.free-motion-replay[data-flow="report"] .progress-panel {
    animation: freePremiumRise 620ms cubic-bezier(0.16, 0.82, 0.2, 1) both;
  }

  body.free-motion-replay[data-flow="report"] #dashboard .overview-panel { animation-delay: 80ms; }
  body.free-motion-replay[data-flow="report"] #stats-grid > * { animation-delay: var(--motion-delay, 160ms); }
  body.free-motion-replay[data-flow="report"] #free-review-summary { animation-delay: 220ms; }
  body.free-motion-replay[data-flow="report"] .dashboard-row { animation-delay: 300ms; }

  body.free-motion-replay[data-flow="report"] #stats-grid > *,
  body.free-motion-replay[data-flow="report"] .quick-review-grid > *,
  body.free-motion-replay[data-flow="report"] .kill-feed > *,
  body.free-motion-replay[data-flow="report"] .utility-events > * {
    animation: freePremiumRise 520ms cubic-bezier(0.2, 0.78, 0.22, 1) both;
  }

  body.free-motion-replay[data-flow="report"] #stats-grid > *:nth-child(1) { --motion-delay: 140ms; }
  body.free-motion-replay[data-flow="report"] #stats-grid > *:nth-child(2) { --motion-delay: 180ms; }
  body.free-motion-replay[data-flow="report"] #stats-grid > *:nth-child(3) { --motion-delay: 220ms; }
  body.free-motion-replay[data-flow="report"] #stats-grid > *:nth-child(4) { --motion-delay: 260ms; }
  body.free-motion-replay[data-flow="report"] #stats-grid > *:nth-child(5) { --motion-delay: 300ms; }

  body.free-motion-replay .progress-fill-bar,
  body.free-motion-replay .progress-fill {
    transform-origin: left center;
    animation: freePremiumRise 440ms ease both;
  }

  body.free-motion-replay .home-trend-line {
    stroke-dasharray: 720;
    stroke-dashoffset: 720;
    animation: freeTrendDraw 900ms ease 520ms both;
  }
}
