:root {
  color-scheme: dark;
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  background: #07120a;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(0, 133, 57, .12), transparent 35rem),
    #07120a;
}

.field {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: .85rem;
  background: rgba(255, 255, 255, .045);
  padding: .8rem .9rem;
  color: white;
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}

.field:focus {
  border-color: rgba(155, 229, 100, .72);
  background: rgba(255, 255, 255, .07);
}

.field::placeholder {
  color: rgba(255, 255, 255, .3);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: .85rem;
  background: linear-gradient(120deg, #008539, #00a651);
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 133, 57, .2);
  transition: filter .16s ease, transform .16s ease;
}

.primary-button:hover {
  filter: brightness(1.13);
}

.primary-button:active {
  transform: scale(.985);
}

.primary-button:disabled {
  cursor: wait;
  opacity: .65;
}

.nav-link {
  white-space: nowrap;
  border-radius: .8rem;
  padding: .65rem .8rem;
  color: rgba(255, 255, 255, .58);
  font-size: .85rem;
  font-weight: 700;
  transition: color .15s ease, background .15s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, .08);
  color: white;
}

.mobile-link {
  display: flex;
  min-width: 4rem;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  border-radius: .8rem;
  padding: .4rem;
  color: rgba(255, 255, 255, .45);
  font-size: .68rem;
  font-weight: 700;
}

.mobile-link.is-active {
  color: #9be564;
}

.card-surface {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .022));
}

.chat-messages {
  min-height: 16rem;
  max-height: min(58vh, 38rem);
  background:
    radial-gradient(ellipse at center, rgba(0, 133, 57, .07), transparent 70%),
    #0b150e;
}

.bubble {
  max-width: min(85%, 34rem);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 1rem;
  padding: .2rem .6rem .4rem .6rem;
  font-size: .92rem;
  line-height: 1.5;
}

.bubble-mine {
  align-self: flex-end;
  border-bottom-right-radius: .3rem;
  background: #08783b;
  color: white;
}

.bubble-theirs {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, .07);
  border-bottom-left-radius: .3rem;
  background: #17221a;
  color: rgba(255, 255, 255, .9);
}

.modal-shell::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(6px);
}

dialog[open] {
  animation: pop-in .16s ease-out;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#toast-region > div {
  pointer-events: auto;
  max-width: min(100%, 34rem);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: .9rem;
  background: #17221a;
  padding: .8rem 1rem;
  box-shadow: 0 12px 38px rgba(0, 0, 0, .35);
}

@media (max-width: 640px) {
  .chat-messages {
    max-height: 57vh;
  }
}

select.field option {
  background-color: #07120a;
  color: #ffffff;
}

