.brand-link-inline {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-link-inline h1 {
  margin: 0;
  font-size: 1.35rem;
}

.compose h2,
.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.compose {
  margin-bottom: 1rem;
}

#theoryForm textarea,
#theoryForm input,
#mailForm input {
  width: 100%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}

#theoryForm textarea:focus,
#theoryForm input:focus,
#mailForm input:focus {
  outline: 1px solid rgba(255, 85, 0, 0.55);
  border-color: rgba(255, 85, 0, 0.45);
}

.compose-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.compose-row input {
  flex: 1;
  min-width: 140px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn:hover {
  border-color: rgba(255, 85, 0, 0.55);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.95), rgba(204, 68, 0, 0.9));
  border-color: rgba(255, 85, 0, 0.85);
  color: #ffffff;
  font-weight: 600;
}

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

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

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

.theory-list li {
  border: 1px solid rgba(255, 85, 0, 0.2);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.45);
}

.theory-list .text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #ffffff;
}

.theory-list .meta {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
}

.vote-row {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.vote-row .btn.active-up {
  border-color: rgba(255, 85, 0, 0.7);
  color: var(--accent);
}

.vote-row .btn.active-down {
  border-color: rgba(255, 107, 107, 0.5);
  color: var(--danger);
}

.score {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.engage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: center;
}

.engage-bar .spacer {
  flex: 1;
}

.mail-block {
  margin-top: 1rem;
}

.mail-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mail-row input {
  flex: 1;
  min-width: 180px;
}

.share-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.card-canvas {
  width: min(100%, 720px);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #050508;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.foot a {
  color: var(--accent);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.flash-ok {
  color: var(--accent) !important;
}

.flash-err {
  color: var(--danger) !important;
}

.energy-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.energy-packs .pack {
  flex: 1 1 140px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.45);
}

.energy-packs .pack strong {
  display: block;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.energy-packs .pack .desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.boost-on {
  color: var(--accent) !important;
  font-weight: 600;
}

.energy-bar.energy-pulse .energy-fill,
.energy-pulse .energy-fill {
  animation: energyPulse 0.9s ease-out;
}

.hero.panel.energy-flash,
.obs-thought.energy-flash,
.obs-void.energy-flash {
  animation: energyFlash 0.85s ease-out;
}

.obs-void.energy-flash {
  box-shadow: inset 0 0 80px rgba(94, 231, 255, 0.12), 0 0 40px rgba(232, 160, 74, 0.2);
}

.obs-thought.energy-flash .obs-latest {
  text-shadow: 0 0 24px rgba(94, 231, 255, 0.25);
}

@keyframes energyPulse {
  0% {
    filter: brightness(1);
  }
  35% {
    filter: brightness(1.8);
    box-shadow: 0 0 16px rgba(255, 85, 0, 0.7);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes energyFlash {
  0% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.15);
  }
  100% {
    filter: brightness(1);
  }
}

.energy-btn-pulse {
  animation: energyBtnPulse 0.7s ease-out;
  box-shadow: 0 0 0 0 rgba(232, 160, 74, 0.55);
}

@keyframes energyBtnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 160, 74, 0.55);
    transform: scale(1);
  }
  40% {
    box-shadow: 0 0 0 14px rgba(232, 160, 74, 0);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 160, 74, 0);
    transform: scale(1);
  }
}

.energy-num-pop {
  animation: energyNumPop 0.55s ease-out;
  color: var(--accent) !important;
}

@keyframes energyNumPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.energy-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}

.energy-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ee7ff;
  box-shadow: 0 0 10px rgba(94, 231, 255, 0.9);
  animation: energyParticle 0.85s ease-out forwards;
}

.energy-particle.paid {
  background: #e8a04a;
  box-shadow: 0 0 12px rgba(232, 160, 74, 0.95);
  width: 10px;
  height: 10px;
}

@keyframes energyParticle {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3);
  }
}

.energy-plus {
  position: fixed;
  transform: translate(-50%, 0);
  color: #e8a04a;
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 0 12px rgba(232, 160, 74, 0.8);
  animation: energyPlus 0.95s ease-out forwards;
  pointer-events: none;
}

@keyframes energyPlus {
  0% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -48px);
  }
}

.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(8, 10, 16, 0.95);
  border: 1px solid rgba(94, 231, 255, 0.35);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(94, 231, 255, 0.1);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  display: block;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.toast p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.toast-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: #fff;
  font-size: 0.85rem;
}

.milestones-panel {
  margin-top: 1rem;
}

.milestone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.milestone-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0;
}

.milestone-list .ms-title {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.milestone-list .ms-title:hover {
  text-decoration: underline;
}

.milestone-list .ms-meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}
