.assistant-shell {
  max-width: 920px;
  margin: auto;
  padding: 64px 20px 96px;
}
.assistant-intro {
  max-width: 760px;
  margin-bottom: 36px;
}
.assistant-intro h1 {
  margin: 0;
  font: 700 clamp(36px, 6vw, 60px)/1.1 var(--font-display);
}
.assistant-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}
.limit-banner {
  padding: 18px 20px;
  border-left: 4px solid var(--amber);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 181, 71, 0.09);
  color: var(--muted);
}
.limit-banner strong {
  display: block;
  color: var(--white);
}
.assistant-form {
  display: grid;
  gap: 20px;
}
.form-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--navy-2);
}
.form-card > .step {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(56, 217, 245, 0.12);
  color: var(--cyan);
  font: 700 15px var(--font-display);
}
.form-card h2 {
  margin: 0;
  font-size: 21px;
}
.form-card > div > p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}
.upload-field,
.preview-wrap,
.form-card > label:not(.check-row),
.form-card > select,
.form-card > textarea,
.character-count,
.field-error,
.check-row {
  grid-column: 1/-1;
}
.upload-field {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 230px;
  margin-top: 14px;
  padding: 24px;
  border: 2px dashed rgba(56, 217, 245, 0.38);
  border-radius: 16px;
  background: rgba(56, 217, 245, 0.035);
  cursor: pointer;
  text-align: center;
}
.upload-field:hover {
  border-color: var(--cyan);
}
.upload-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload-field strong {
  margin-top: 12px;
  font-size: 18px;
}
.upload-field small {
  color: var(--muted);
}
.preview-wrap {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.preview-wrap img {
  max-width: 100%;
  max-height: 460px;
  border-radius: 16px;
  object-fit: contain;
}
.text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.form-card > label:not(.check-row) {
  margin-top: 16px;
  font-weight: 600;
}
.form-card label span {
  color: var(--muted);
  font-weight: 400;
}
.form-card select,
.form-card textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #081c2f;
  color: var(--white);
}
.form-card textarea {
  resize: vertical;
}
.character-count {
  text-align: right;
  color: var(--muted);
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.check-row input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--cyan);
}
.field-error {
  min-height: 1px;
  margin: 4px 0 0;
  color: #ffb4ad;
}
.submit-button {
  width: 100%;
  border: 0;
  cursor: pointer;
}
.submit-button[disabled] {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}
.analysis-status,
.error-panel,
.result-panel {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--navy-2);
}
.analysis-status {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
.analysis-status[hidden] {
  display: none;
}
.analysis-status span {
  color: var(--muted);
}
.loader {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border: 4px solid rgba(56, 217, 245, 0.16);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.error-panel {
  border-color: rgba(255, 181, 71, 0.48);
}
.error-panel h2 {
  margin-top: 0;
}
.error-panel p {
  color: var(--muted);
}
.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.result-heading h2 {
  margin: 0;
  font-size: 26px;
}
.disclaimer {
  padding: 14px;
  border-left: 3px solid var(--amber);
  background: rgba(255, 181, 71, 0.07);
  color: var(--muted);
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.result-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
}
.result-grid h3 {
  margin-top: 0;
}
.result-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.result-item:last-child {
  border: 0;
}
.result-item strong,
.result-item span {
  display: block;
}
.result-item span,
.result-item p,
.result-grid li {
  color: var(--muted);
}
.result-grid ul {
  padding-left: 20px;
}
.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.allowance {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 640px) {
  .assistant-shell {
    padding-top: 40px;
  }
  .form-card {
    grid-template-columns: 1fr;
  }
  .form-card > .step {
    grid-row: auto;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .result-heading {
    flex-direction: column;
  }
  .result-actions {
    flex-direction: column;
  }
  .result-actions > * {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader {
    animation-duration: 1.8s;
  }
}
.upload-field:focus-within {
  border-color: var(--cyan);
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}
.preview-wrap[hidden],
.followup-panel[hidden],
.success-panel[hidden] {
  display: none;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.followup-panel {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--navy-2);
}
.followup-panel h2 {
  margin: 0 0 8px;
  font: 700 clamp(24px, 4vw, 32px)/1.2 var(--font-display);
}
.followup-panel > p {
  color: var(--muted);
}
.equipment-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.equipment-controls label {
  grid-column: 1/-1;
  font-weight: 600;
}
.equipment-controls select,
.report-grid input,
.report-grid select,
#report-notes {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #081c2f;
  color: var(--white);
}
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.equipment-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
}
.equipment-card img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
}
.equipment-card h3 {
  margin: 0;
  font-size: 16px;
}
.equipment-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.equipment-card a {
  align-self: end;
  color: var(--cyan);
  font-weight: 700;
}
.equipment-store-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 10px;
  align-items: center;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.report-grid label,
#report-form > label:not(.check-row) {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.report-grid label span,
#report-form > label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
#report-form {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.success-panel {
  padding: 18px;
  border: 1px solid rgba(68, 212, 157, 0.45);
  border-radius: 14px;
  background: rgba(68, 212, 157, 0.08);
}
.success-panel h3 {
  margin-top: 0;
}
@media (max-width: 640px) {
  .equipment-controls,
  .equipment-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }
  .equipment-card {
    grid-template-columns: 84px 1fr;
  }
  .equipment-card img {
    width: 84px;
    height: 84px;
  }
  .followup-panel {
    padding: 20px;
  }
}
@media (max-width: 360px) {
  .lab-header {
    min-height: 68px;
  }
  .lab-header .brand img {
    width: 44px;
    height: 44px;
  }
  .lab-header .brand small {
    display: none;
  }
  .lab-header .button {
    padding-inline: 12px;
  }
  .assistant-shell {
    padding-top: 28px;
  }
  .story-art {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader {
    animation: none;
    border-color: var(--cyan);
  }
}
