/* Apex Coach — dark tactical HUD aesthetic (original; not EA branding) */

:root {
  --bg: #07090c;
  --bg-elev: #0e1319;
  --bg-elev-2: #151c25;
  --bg-panel: rgba(14, 19, 25, 0.94);
  --border: #2a3a4d;
  --border-sharp: #33485e;
  --border-focus: #5eead4;
  --text: #f1f5f9;
  --text-muted: #a8b6c7;
  --text-body: #d0dae6;
  --accent: #f97316;
  --accent-hot: #fb923c;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --teal-soft: rgba(45, 212, 191, 0.14);
  --danger-soft: rgba(248, 113, 113, 0.1);
  --warn-soft: rgba(251, 191, 36, 0.12);
  --radius: 4px;
  --radius-sm: 3px;
  --clip-panel: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  --tap: 48px;
  --focus-ring: 0 0 0 3px rgba(94, 234, 212, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 4.5rem; /* room for sticky mobile CTA */
}

@media (min-width: 860px) {
  body {
    padding-bottom: 0;
  }
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 8% -8%, rgba(249, 115, 22, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 0%, rgba(45, 212, 191, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 25% at 50% 100%, rgba(56, 189, 248, 0.05), transparent 55%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
}

.bg-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.35) 2px,
    rgba(0, 0, 0, 0.35) 3px
  );
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #111;
  padding: 0.7rem 1.15rem;
  z-index: 100;
  font-weight: 700;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.site-header,
.layout,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.35rem 1.15rem 0.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(145deg, var(--accent-hot), var(--accent) 55%, #c2410c);
  color: #0a0a0a;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.4);
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}

.tagline {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 860px) {
  .layout {
    grid-template-columns: minmax(300px, 380px) 1fr;
    align-items: start;
    gap: 1.15rem;
  }
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  clip-path: var(--clip-panel);
  padding: 1.25rem 1.2rem 1.3rem;
  box-shadow: var(--shadow);
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 14px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  pointer-events: none;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  flex-shrink: 0;
}

.field {
  margin-bottom: 1.15rem;
}

.field > label,
.field legend {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c5d0dc;
}

.optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  opacity: 0.95;
}

.required-mark {
  color: var(--accent-hot);
}

select,
textarea,
input[type="search"] {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px solid var(--border-sharp);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: var(--tap);
}

input[type="search"] {
  padding-right: 0.95rem;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23a8b6c7'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

select:hover,
textarea:hover,
input[type="search"]:hover {
  border-color: #4a6380;
}

select:focus,
textarea:focus,
input[type="search"]:focus,
select:focus-visible,
textarea:focus-visible,
input[type="search"]:focus-visible {
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}

textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.45;
}

.hint {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.examples {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.examples .ex {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.4);
  text-underline-offset: 2px;
  cursor: pointer;
  border-radius: 2px;
}

.examples .ex:hover,
.examples .ex:focus-visible {
  color: #5eead4;
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.suggest-chip {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-body);
  background: var(--bg);
  border: 1px solid var(--border-sharp);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  min-height: 2.5rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.suggest-chip:hover {
  border-color: rgba(45, 212, 191, 0.55);
  color: var(--text);
  background: var(--teal-soft);
}

.suggest-chip:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.mode-field,
.situ-field {
  border: none;
  padding: 0;
  margin: 0 0 1.15rem;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.35rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.seg {
  cursor: pointer;
  margin: 0;
  position: relative;
}

.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: var(--tap);
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.seg:hover span {
  color: var(--text);
}

.seg input:focus-visible + span {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.seg input:checked + span {
  background: var(--accent-soft);
  color: var(--accent-hot);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.5);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  cursor: pointer;
  margin: 0;
  flex: 1 1 calc(50% - 0.55rem);
  min-width: 7.5rem;
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-sharp);
  background: var(--bg-elev-2);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.chip:hover span {
  border-color: #4a6380;
  color: var(--text);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.chip input:checked + span {
  background: var(--teal-soft);
  border-color: rgba(45, 212, 191, 0.55);
  color: #5eead4;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.btn {
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.2rem;
  min-height: var(--tap);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s, filter 0.15s, border-color 0.15s, color 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.btn.primary {
  background: linear-gradient(145deg, var(--accent-hot), var(--accent));
  color: #0a0a0a;
  border-color: #ea580c;
  flex: 1;
  min-width: 8rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-sharp);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: #4a6380;
}

/* Sticky Get tips on mobile */
@media (max-width: 859px) {
  .actions-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    margin: 0;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, rgba(7, 9, 12, 0.92) 28%, rgba(7, 9, 12, 0.98));
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
    display: flex;
    gap: 0.55rem;
  }

  .actions-sticky .btn.primary {
    flex: 1.4;
  }

  .actions-sticky .btn.ghost {
    flex: 0.8;
  }
}

.results-head {
  margin-bottom: 0.85rem;
}

.results-head .panel-title {
  margin-bottom: 0.45rem;
}

.context-line {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.context-line strong {
  color: var(--text);
  font-weight: 700;
}

.role-pill,
.map-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.role-pill {
  background: var(--teal-soft);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: var(--accent-2);
}

.map-pill {
  background: var(--accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: var(--accent-hot);
}

.match-note {
  margin: 0.65rem 0 0;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #fde68a;
  background: var(--warn-soft);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-sm);
}

.match-note.match-strong {
  color: #99f6e4;
  background: var(--teal-soft);
  border-color: rgba(45, 212, 191, 0.35);
}

.match-note.hidden {
  display: none;
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tip-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1.05rem 1.05rem 1.1rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  animation: tip-in 0.28s ease both;
}

.tip-card-map {
  border-left-color: var(--accent-2);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.06), var(--bg-elev-2) 40%);
}

.tip-card:nth-child(2) { animation-delay: 0.04s; }
.tip-card:nth-child(3) { animation-delay: 0.08s; }
.tip-card:nth-child(4) { animation-delay: 0.12s; }
.tip-card:nth-child(5) { animation-delay: 0.16s; }
.tip-card:nth-child(6) { animation-delay: 0.2s; }
.tip-card:nth-child(7) { animation-delay: 0.24s; }

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

.tip-index {
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.25rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: var(--accent-hot);
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--mono);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.tip-content {
  min-width: 0;
}

.tip-title {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--text);
}

.tip-body {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-body);
}

.tip-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tip-tag.mode {
  color: var(--accent-hot);
  border-color: rgba(249, 115, 22, 0.4);
  background: var(--accent-soft);
}

.tip-tag.match {
  color: var(--accent-2);
  border-color: rgba(45, 212, 191, 0.4);
  background: var(--teal-soft);
}

.tip-tag.map {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

.tip-tag.situation,
.tip-tag.general {
  color: var(--text-muted);
}

.empty-state {
  margin: 0;
  padding: 1.5rem 0.85rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.empty-state.hidden {
  display: none;
}

.empty-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.empty-steps {
  margin: 1rem auto 0;
  padding: 0;
  list-style: none;
  max-width: 22rem;
  text-align: left;
}

.empty-steps li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.35rem;
  color: var(--text-body);
  font-size: 0.92rem;
}

.empty-steps li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

.tips-list:not(:empty) ~ .empty-state {
  display: none;
}

.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.35rem 1.15rem 2rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 0.95rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
}

@media (max-width: 480px) {
  .site-header {
    padding: 1.1rem 1rem 0.25rem;
  }

  .layout {
    padding: 0.85rem 1rem 1rem;
    gap: 0.85rem;
  }

  .panel {
    padding: 1.1rem 1rem 1.15rem;
  }

  .chip {
    flex: 1 1 100%;
  }

  .actions:not(.actions-sticky) {
    flex-direction: column;
  }

  .tip-card {
    gap: 0.7rem;
    padding: 0.95rem 0.9rem;
  }

  .tip-title {
    font-size: 1.02rem;
  }

  .tip-body {
    font-size: 0.95rem;
  }

  .site-footer {
    padding: 0.25rem 1rem 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tip-card {
    animation: none;
  }

  .btn:active {
    transform: none;
  }
}

/* ——— Rebuild: Plan + Log home (primary UX) ——— */

body {
  padding-bottom: 1.5rem;
}

.home-layout {
  grid-template-columns: 1fr !important;
  max-width: 640px; /* desktop card ~560–640px */
}

.view.hidden,
.view[hidden] {
  display: none !important;
}

.season-chip {
  margin: 0.75rem 0 0;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--border);
  background: var(--teal-soft);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}

.home-lead {
  margin: 0 0 1rem;
  color: var(--text-body);
  font-size: 1rem;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.btn-home {
  appearance: none;
  border: 1px solid var(--border-sharp);
  background: var(--bg-elev);
  color: var(--text);
  text-align: left;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  clip-path: var(--clip-panel);
  box-shadow: var(--shadow);
  min-height: 5.5rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.btn-home:hover {
  border-color: var(--accent);
  background: var(--bg-elev-2);
}

.btn-home:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow);
}

.btn-home:active {
  transform: scale(0.985);
}

.btn-home.plan {
  border-color: rgba(249, 115, 22, 0.55);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), var(--bg-elev) 55%);
}

.btn-home.log {
  border-color: rgba(45, 212, 191, 0.45);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.14), var(--bg-elev) 55%);
}

.btn-home-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.btn-home-title {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.btn-home-sub {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.home-note {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tips-drawer {
  margin-top: 1.25rem;
  border: 1px dashed var(--border);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.tips-drawer summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tips-drawer[open] summary {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.view-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.view-bar .panel-title {
  margin: 0;
}

.btn.back {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}

.field-grid .field-span {
  grid-column: 1 / -1;
}

@media (max-width: 420px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.followups {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem 0.9rem;
  border-radius: var(--radius-sm);
  margin: 0.85rem 0 0;
}

.followups legend {
  padding: 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--text-body);
  min-height: 44px;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.result-panel {
  margin-top: 0.85rem;
}

.result-heading {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.plan-lines {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.plan-lines li {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.plan-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-hot);
  padding-top: 0.15rem;
}

.plan-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.log-lines {
  margin: 0.75rem 0 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.85rem;
}

.log-lines dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding-top: 0.2rem;
}

.log-lines dd {
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.45;
}

.tip-browser-note {
  margin: 0 0 0.75rem;
}

.tip-card {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0.95rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tip-source {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tip-title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 800;
}

.tip-body {
  margin: 0;
  color: var(--text-body);
  font-size: 0.95rem;
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.optional {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85em;
}

.copy-block {
  display: none;
}

@media (max-width: 480px) {
  .site-footer {
    padding: 0.25rem 1rem 1.5rem;
  }

  .plan-lines li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .log-lines {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* --- Sonny polish: nav, home snapshot, tilt, solid CTAs --- */

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.nav-link {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: var(--tap);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.nav-link.is-active {
  color: var(--accent-hot);
}

.nav-dot {
  color: var(--text-muted);
  opacity: 0.5;
  user-select: none;
}

.home-snapshot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .home-snapshot {
    grid-template-columns: 1fr 1fr;
  }
}

.snap-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.snap-today {
  border-color: rgba(45, 212, 191, 0.35);
}

.snap-label {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.snap-body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.4;
}

.form-error {
  margin: 0.5rem 0 0;
  color: #fca5a5;
  font-size: 0.9rem;
  font-weight: 600;
}

.tilt-banner {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.9rem;
  background: var(--warn-soft);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-sm);
}

.tilt-banner p {
  margin: 0;
  color: #fde68a;
  font-size: 0.92rem;
  font-weight: 600;
}

.btn.solid {
  /* both CTAs solid — already primary; ensure ghost never used for main CTAs */
  opacity: 1;
}

.btn.primary.solid {
  background: linear-gradient(145deg, var(--accent-hot), var(--accent));
  color: #0a0a0a;
}

/* Rank/Queue/Legend/Map one row desktop — no truncate World's Edge */
.plan-chips {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .plan-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .plan-chips .field-span {
    grid-column: 1 / -1;
  }
  .plan-chips select {
    font-size: 0.95rem;
    padding-left: 0.65rem;
    padding-right: 2.1rem;
    text-overflow: clip;
    white-space: nowrap;
  }
  .plan-chips .field-help {
    font-size: 0.72rem;
  }
}

/* Note textarea — full-width, 2 rows compact */
#log-note {
  width: 100%;
  resize: vertical;
  min-height: 3.2rem;
  line-height: 1.4;
  padding: 0.65rem 0.85rem;
}

.log-context-row {
  margin-top: 0.75rem;
  opacity: 0.92;
}

.legal-details {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.legal-details summary {
  cursor: pointer;
  font-weight: 600;
}

.legal-details p {
  margin: 0.4rem 0 0;
  line-height: 1.45;
}

.site-footer p {
  margin: 0;
}

/* Ensure home cards keyboard + hover (already present; reinforce tap) */
.btn-home {
  min-height: var(--tap);
  width: 100%;
}

.plan-lines li {
  grid-template-columns: 6.5rem 1fr;
}

@media (max-width: 480px) {
  .plan-lines li {
    grid-template-columns: 1fr;
  }
}

/* --- Sonny verbatim UI polish --- */
.btn-home-cta {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong, var(--border));
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-home.plan .btn-home-cta {
  border-color: rgba(249, 115, 22, 0.55);
  color: #fdba74;
}

.btn-home.log .btn-home-cta {
  border-color: rgba(45, 212, 191, 0.55);
  color: #5eead4;
}

.field-help {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.plan-empty-hint {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ranked-rules {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ranked-rules li + li {
  margin-top: 0.35rem;
}

.snap-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.btn.tiny {
  min-height: 32px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
}

.same-leak {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid #f97316;
  background: rgba(249, 115, 22, 0.08);
  color: #fdba74;
  font-size: 0.88rem;
  font-weight: 600;
}

.snap-leak .snap-body {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --- Roll card UX (apexrandomizer-style layout, Apex Coach skin) --- */
.roll-panel {
  margin-top: 1rem;
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(160deg, rgba(249, 115, 22, 0.08), var(--bg-elev) 42%);
  padding-bottom: 5.5rem; /* room for sticky Generate on mobile */
}

.roll-panel .result-heading {
  color: var(--accent-hot);
  letter-spacing: 0.12em;
  margin: 0;
}

.roll-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.roll-heading-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

#spin-mute[aria-pressed="true"] {
  opacity: 0.65;
}

.roll-generate-bar {
  display: flex;
  margin: 0.75rem 0 0.5rem;
}

.roll-generate-btn {
  width: 100%;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 3rem;
}

@media (max-width: 859px) {
  .roll-panel .roll-generate-bar.actions-sticky {
    /* reuse sticky mobile bar pattern */
  }
  .roll-panel {
    padding-bottom: 6.5rem;
  }
}

@media (min-width: 860px) {
  .roll-generate-bar.actions-sticky {
    position: static;
    background: none;
    border: 0;
    padding: 0;
    margin: 0.75rem 0 0.85rem;
    backdrop-filter: none;
  }
}

.roll-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.roll-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bench-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.roll-card {
  position: relative;
  padding: 0.75rem 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 9, 12, 0.78);
  clip-path: var(--clip-panel);
  transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.roll-card.is-shuffle {
  animation: card-shuffle 0.18s ease;
  border-color: rgba(249, 115, 22, 0.7);
}

@keyframes card-shuffle {
  0% { opacity: 0.55; transform: translateY(4px) scale(0.98); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

.roll-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.roll-card-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.reroll-btn {
  min-width: 2rem;
  padding: 0.15rem 0.45rem;
  font-size: 1rem;
  line-height: 1;
}

.legend-card.is-hero {
  border-color: rgba(249, 115, 22, 0.45);
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.12), rgba(7, 9, 12, 0.85));
}

.legend-mono {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #0a0a0a;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.legend-card.is-bench .legend-mono {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.9rem;
}

.legend-mono[data-class="assault"] { background: #e85d4c; }
.legend-mono[data-class="skirmisher"] { background: #f0a202; }
.legend-mono[data-class="recon"] { background: #3db8ff; color: #061018; }
.legend-mono[data-class="support"] { background: #4ade80; color: #06140c; }
.legend-mono[data-class="controller"] { background: #a78bfa; color: #12081f; }

.legend-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.legend-card.is-bench .legend-name {
  font-size: 0.98rem;
}

.legend-class {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.landed-job {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}

.weapon-card .weapon-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 750;
}

.weapon-meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.weapon-meta.is-carepack {
  color: var(--accent-hot);
}

.map-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.map-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(15, 20, 28, 0.9);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.map-chip.is-active {
  color: #0a0a0a;
  background: var(--accent-hot);
  border-color: var(--accent-hot);
}

.map-panel {
  position: relative;
  height: 9.5rem;
  border-radius: 0.55rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 30% 40%, rgba(249, 115, 22, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(45, 212, 191, 0.12), transparent 50%),
    linear-gradient(160deg, #121820, #0a0e14 60%, #151c26);
  margin-bottom: 0.55rem;
}

.map-panel[data-map="olympus"] {
  background:
    radial-gradient(ellipse at 55% 40%, rgba(61, 184, 255, 0.2), transparent 55%),
    radial-gradient(ellipse at 30% 70%, rgba(249, 115, 22, 0.12), transparent 50%),
    linear-gradient(160deg, #101820, #0a1018 60%, #14202c);
}

.map-panel[data-map="broken-moon"] {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(167, 139, 250, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 30%, rgba(249, 115, 22, 0.12), transparent 45%),
    linear-gradient(160deg, #14121c, #0c0a12 60%, #1a1624);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.7;
  pointer-events: none;
}

.drop-pin {
  position: absolute;
  width: 1.4rem;
  height: 1.4rem;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

.drop-ring {
  position: absolute;
  inset: -0.35rem;
  border: 2px solid rgba(249, 115, 22, 0.85);
  border-radius: 50%;
  animation: drop-pulse 1.6s ease-out infinite;
}

.drop-dot {
  position: absolute;
  inset: 0.25rem;
  background: var(--accent-hot);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.7);
}

@keyframes drop-pulse {
  0% { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.55); opacity: 0; }
}

.drop-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.drop-cluster {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--accent-hot);
  letter-spacing: 0.02em;
}

.drop-tip {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.roll-actions {
  margin-top: 0.85rem;
}

.roll-panel .plan-lines {
  margin-top: 0.75rem;
}

/* Filter slide-over */
.filter-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(22rem, 92vw);
  z-index: 70;
  background: #0c1016;
  border-left: 1px solid var(--border);
  padding: 1rem 1rem 1.5rem;
  overflow: auto;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

.filter-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.filter-drawer-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-drawer-actions {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.filter-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.filter-legend {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(15, 20, 28, 0.9);
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  text-align: left;
  opacity: 0.45;
}

.filter-legend.is-on {
  opacity: 1;
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.08);
}

.filter-legend .legend-mono {
  width: 2rem;
  height: 2rem;
  font-size: 0.72rem;
  margin: 0;
  flex-shrink: 0;
}

.filter-legend-name {
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
}

.filter-hint {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

body.filter-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .roll-card.is-shuffle,
  .drop-ring {
    animation: none !important;
  }
}
