:root {
  color-scheme: dark;
  --black: #050505;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --white: #fffdf4;
  --muted: rgba(255, 253, 244, 0.72);
  --line: rgba(255, 253, 244, 0.16);
  --gold: #d8ad3d;
  --gold-light: #ffe28f;
  --green: #10a64d;
  --yellow: #f0b429;
  --red: #d33b32;
  --input: #fff8e4;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 86% 4%, rgba(216, 173, 61, 0.25), transparent 28rem),
    radial-gradient(circle at 8% 0%, rgba(16, 166, 77, 0.2), transparent 24rem),
    linear-gradient(180deg, #050505 0%, #0b0906 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.screen {
  display: none;
  min-height: calc(100vh - 40px);
}

.screen.is-active {
  display: grid;
  align-content: start;
  gap: 16px;
}

.hero {
  display: grid;
  gap: 16px;
}

.brand-row,
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-row {
  justify-content: flex-start;
}

.brand-row.compact {
  min-width: 0;
}

.brand-row strong,
.top strong {
  display: block;
  font-weight: 850;
}

.brand-row span span,
.top span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, #087334, var(--green));
  border: 1px solid rgba(255, 226, 143, 0.75);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.35);
  font-weight: 950;
}

.hero-logo {
  width: min(100%, 390px);
  max-height: 260px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.38));
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.eyebrow,
.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 226, 143, 0.5);
  color: var(--gold-light);
  background: rgba(216, 173, 61, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 3rem;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  font-size: 1.35rem;
  letter-spacing: 0;
}

p,
.hint {
  color: var(--muted);
  line-height: 1.45;
}

.panel,
.result-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.32);
}

.login-card,
.signup-card,
.quick-test,
.vehicle-panel,
.android-panel {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: grid;
  gap: 5px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--input);
  color: #090806;
  border-radius: 16px;
  min-height: 52px;
  padding: 13px 14px;
  outline: none;
  font-weight: 750;
}

textarea {
  min-height: 98px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 4px rgba(216, 173, 61, 0.18);
}

.primary,
.ghost,
.icon-btn {
  min-height: 52px;
  border-radius: 16px;
  padding: 13px 16px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary {
  color: #090806;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-color: rgba(255, 226, 143, 0.72);
}

.ghost,
.icon-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
}

.icon-btn {
  min-width: 48px;
  width: 48px;
  padding: 0;
  font-size: 1.8rem;
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.progress span {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.progress span.is-active {
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
}

.signup-step {
  display: none;
  gap: 14px;
}

.signup-step.is-active {
  display: grid;
}

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

.form-actions {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.form-actions .primary.is-hidden,
.is-hidden {
  display: none !important;
}

.helper,
.answer,
.calc-details {
  border: 1px solid rgba(255, 226, 143, 0.32);
  background: rgba(216, 173, 61, 0.12);
  border-radius: 18px;
  padding: 14px;
  color: var(--white);
  line-height: 1.45;
}

.answer {
  display: grid;
  gap: 5px;
}

.answer strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.15;
}

.answer span,
.answer small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.answer-good {
  border-color: rgba(47, 214, 111, 0.55);
  background: rgba(16, 166, 77, 0.18);
}

.answer-good strong {
  color: #7dffae;
}

.answer-limit {
  border-color: rgba(255, 226, 143, 0.68);
  background: rgba(240, 180, 41, 0.16);
}

.answer-limit strong {
  color: var(--gold-light);
}

.answer-bad {
  border-color: rgba(255, 112, 102, 0.58);
  background: rgba(211, 59, 50, 0.16);
}

.answer-bad strong {
  color: #ff9b93;
}

.calc-details {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
  font-size: 0.92rem;
}

.source-box {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 226, 143, 0.24);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.source-box strong,
.source-box span {
  display: block;
}

.source-box p,
.source-box span {
  color: var(--muted);
  line-height: 1.42;
}

.source-box span {
  font-size: 0.84rem;
}

.voice-main {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "icon help";
  align-items: center;
  gap: 2px 14px;
  min-height: 92px;
  border: 1px solid rgba(255, 226, 143, 0.72);
  border-radius: 24px;
  padding: 16px;
  color: #090806;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 18px 58px rgba(216, 173, 61, 0.24);
  text-align: left;
}

.voice-main span {
  grid-area: icon;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: rgba(5, 5, 5, 0.1);
  font-size: 1.9rem;
}

.voice-main strong {
  grid-area: title;
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.voice-main small {
  grid-area: help;
  color: rgba(9, 8, 6, 0.72);
  font-weight: 750;
  line-height: 1.25;
}

.add-preview {
  justify-content: center;
}

.result-card {
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(216, 173, 61, 0.18), transparent 72%),
    linear-gradient(180deg, var(--panel-strong), var(--panel));
}

.result-card h1 {
  font-size: 2.6rem;
}

.vehicle-panel {
  grid-template-columns: 1fr;
}

.vehicle-list {
  display: grid;
  gap: 8px;
}

.vehicle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 12px;
}

.vehicle-item strong {
  display: block;
}

.vehicle-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.mode-list {
  display: grid;
  gap: 8px;
}

.mode-list div {
  display: grid;
  gap: 3px;
  border-left: 4px solid var(--gold);
  padding: 10px 0 10px 12px;
}

.mode-list strong,
.mode-list span {
  display: block;
}

.mode-list span {
  color: var(--muted);
  line-height: 1.35;
}

.float-demo {
  position: fixed;
  inset: auto 16px calc(18px + env(safe-area-inset-bottom)) auto;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.float-bubble,
.float-card {
  pointer-events: auto;
}

.float-bubble {
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 226, 143, 0.82);
  border-radius: 24px;
  color: #090806;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  font-size: 1.25rem;
  font-weight: 950;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.52);
}

.float-bubble.is-good {
  color: var(--white);
  background: linear-gradient(180deg, #26c965, var(--green));
}

.float-bubble.is-limit {
  color: #090806;
  background: linear-gradient(180deg, var(--gold-light), var(--yellow));
}

.float-bubble.is-bad {
  color: var(--white);
  background: linear-gradient(180deg, #ff665c, var(--red));
}

.float-card {
  width: min(340px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 226, 143, 0.38);
  border-radius: 24px;
  padding: 14px;
  background: rgba(8, 8, 8, 0.96);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.64);
}

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

.float-top strong,
.float-top span {
  display: block;
}

.float-top span {
  color: var(--muted);
  font-size: 0.84rem;
}

.float-top button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.45rem;
}

.float-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.float-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.075);
  font-weight: 900;
}

.float-tabs button.is-active {
  color: #090806;
  border-color: rgba(255, 226, 143, 0.78);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.float-mode {
  display: none;
  gap: 10px;
}

.float-mode.is-active {
  display: grid;
}

.float-mode textarea {
  min-height: 78px;
}

.auto-offer {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label price"
    "detail price";
  gap: 2px 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.075);
}

.auto-offer span {
  grid-area: label;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.auto-offer strong {
  grid-area: price;
  color: var(--gold-light);
  font-size: 1.6rem;
  line-height: 1;
}

.auto-offer small {
  grid-area: detail;
  color: var(--white);
  font-weight: 850;
}

.float-mini-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.88rem;
  line-height: 1.35;
}

.compact-voice {
  min-height: 78px;
  border-radius: 20px;
  padding: 12px;
}

.compact-voice span {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 1.55rem;
}

.compact-voice strong {
  font-size: 1rem;
}

@media (min-width: 760px) {
  h1 {
    font-size: 4.3rem;
  }

  .result-card h1 {
    font-size: 3.5rem;
  }

  .screen-login.is-active {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }

  .hero-logo {
    max-height: 330px;
  }

  .login-card {
    align-self: center;
  }

  #signupScreen.is-active,
  #homeScreen.is-active {
    width: min(680px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 2.55rem;
  }

  .result-card h1 {
    font-size: 2.2rem;
  }

  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-logo {
    max-height: 220px;
  }

  .grid-2,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .panel,
  .result-card {
    border-radius: 22px;
    padding: 16px;
  }
}
