@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --bg: #f5f7ff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #151a2d;
  --muted: #65708f;
  --subtle: #7f8bb0;
  --line: #d8e0ff;
  --amber: #ffa51f;
  --amber-dark: #e78c00;
  --teal: #294fe1;
  --teal-dark: #2d5fbd;
  --red: #c64235;
  --orange: #d66b1f;
  --yellow: #9e7114;
  --green: #207846;
  --blue: #2d647c;
  --shadow: 0 22px 52px rgba(42, 85, 190, 0.15);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    "Pretendard Variable", Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

body.legal-page {
  display: block;
  padding: 24px;
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 165, 31, 0.28);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 28px 20px;
  background: #2f5fbd;
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand.compact h1 {
  font-size: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--amber);
  color: #fff;
  font-weight: 850;
}

.brand h1,
.topbar h2,
.hero h3,
.card h3,
.status-card h4,
.quick-card strong {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #dbe6ff;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
  padding: 0 12px;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 850;
}

.nav-item.active,
.nav-item:hover {
  background: #fff;
  color: #21449b;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  background: rgba(41, 79, 225, 0.12);
  color: var(--teal);
}

.side-panel {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.side-note {
  margin: 12px 0 0;
  color: #edf3ff;
  font-size: 13px;
  line-height: 1.5;
}

.plan-row,
.status-mini,
.section-heading,
.history-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.meter {
  height: 8px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.meter-fill {
  width: 0;
  height: 100%;
  background: var(--amber);
  transition: width 0.2s ease;
}

.main {
  min-width: 0;
  padding: 28px;
}

.mobile-header {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.primary-action,
.secondary-action,
.icon-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-action {
  border: 0;
  background: var(--teal);
  color: #fff;
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action,
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.danger-action {
  border-color: rgba(198, 66, 53, 0.28);
  color: var(--red);
}

.full {
  width: 100%;
}

.small {
  min-height: 36px;
  padding: 0 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f5fbd 0%, #244fc0 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h3 {
  max-width: 820px;
  font-size: clamp(32px, 4vw, 60px);
  line-height: 1.04;
  color: #fff;
  overflow-wrap: anywhere;
}

.hero p,
.status-card p,
.card p,
.hint {
  color: var(--muted);
  line-height: 1.65;
}

.hero p {
  max-width: 700px;
  overflow-wrap: anywhere;
}

.mobile-hero-vector {
  display: none;
}

.hero .eyebrow,
.hero p {
  color: #edf3ff;
}

.hero-actions,
.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-card,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.status-card {
  align-self: stretch;
  padding: 20px;
}

.status-card .eyebrow {
  color: var(--subtle);
}

.phone-preview {
  display: grid;
  place-items: center;
  gap: 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #2f5fbd;
  color: #fff;
  padding: 20px 16px;
  text-align: center;
  overflow: hidden;
}

.preview-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--amber);
  color: #fff;
  font-weight: 900;
}

.phone-preview strong {
  max-width: 240px;
  font-size: 22px;
  line-height: 1.25;
}

.preview-cta {
  width: min(260px, 100%);
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--amber);
  color: #fff;
  font-weight: 900;
}

.onboarding-shot,
.auth-shot {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  object-fit: contain;
}

.onboarding-shot {
  max-height: 230px;
  object-position: center;
}

.auth-phone-card {
  overflow: hidden;
  padding: 0 22px 22px;
  background: linear-gradient(180deg, #2f5fbd 0 230px, #fff 230px);
}

.auth-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  margin: 0 -22px 18px;
  padding: 18px 18px 0;
  overflow: hidden;
}

.auth-back {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--amber);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.auth-shot {
  max-height: 190px;
  object-position: center bottom;
}

.status-card h4 {
  font-size: 24px;
}

.status-mini {
  align-items: stretch;
  margin-top: 16px;
}

.status-mini span {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 22px;
}

.warning {
  border-color: rgba(198, 66, 53, 0.22);
}

.flow-list {
  padding-left: 22px;
  line-height: 1.9;
}

.quick-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.quick-card:hover {
  border-color: rgba(41, 79, 225, 0.45);
  box-shadow: 0 10px 24px rgba(41, 79, 225, 0.08);
}

.quick-card span {
  color: var(--muted);
  line-height: 1.45;
}

.compact-card {
  min-height: 56px;
}

.form {
  display: grid;
  gap: 18px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.auth-provider-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-session-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.auth-session-panel h4 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.save-state,
.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.save-state {
  background: #eaf0ff;
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  color: #23315f;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 2px solid #294fe1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

::placeholder {
  color: #8d98b8;
  opacity: 1;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 165, 31, 0.18);
}

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

.upload-box {
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 1px dashed #6682ee;
  border-radius: 8px;
  background: #f8faff;
  text-align: center;
  color: var(--ink);
  padding: 18px;
}

.upload-box input {
  display: none;
}

.upload-box small {
  color: var(--muted);
}

.url-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

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

.symptom-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font-weight: 700;
}

.symptom-grid input {
  width: auto;
  min-height: 0;
}

.analysis-layout {
  align-items: start;
}

.video-preview {
  display: grid;
  place-items: center;
  min-height: 260px;
  margin: 14px 0;
  border-radius: 8px;
  background: #211e1a;
  color: #fff8ee;
  overflow: hidden;
  text-align: center;
}

.video-preview video {
  display: block;
  width: 100%;
  max-height: 360px;
  background: #000;
}

.nutrition-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
  overflow: hidden;
  text-align: center;
  color: var(--muted);
}

.nutrition-preview img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #fff;
}

.compact-upload {
  min-height: 112px;
}

.triage-image-preview {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
  color: var(--muted);
  overflow: hidden;
  text-align: center;
}

.triage-image-preview img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #fff;
}

.triage-question-list {
  display: grid;
  gap: 12px;
}

.triage-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.triage-group summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
  list-style-position: inside;
}

.triage-group summary span {
  color: var(--muted);
  font-size: 13px;
}

.triage-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.triage-check-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8faff;
  font-size: 14px;
  line-height: 1.4;
}

.triage-check-grid input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin-top: 3px;
}

.triage-action-bar {
  display: grid;
  gap: 10px;
}

.youtube-preview {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  text-align: left;
}

.youtube-preview img {
  width: 100%;
  border-radius: 8px;
  background: #000;
}

.youtube-preview p {
  color: #e9dccb;
}

.youtube-preview a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.analysis-output {
  line-height: 1.65;
}

.analysis-output h4 {
  margin: 0 0 10px;
  font-size: 20px;
}

.analysis-output ul {
  padding-left: 20px;
}

.error-text {
  color: var(--red);
  font-weight: 800;
}

.dog-message,
.model-panel {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
}

.dog-message {
  border-color: rgba(217, 131, 46, 0.32);
  background: #fff8ed;
}

.dog-message p {
  margin: 8px 0 0;
  color: var(--ink);
}

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

.metric-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.metric-grid strong {
  color: var(--ink);
  font-size: 16px;
}

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

.condition-list div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faff;
}

.condition-list span {
  color: var(--muted);
  font-size: 13px;
}

.risk-badge.idle {
  background: #e9e2d8;
  color: var(--muted);
}

.risk-badge.NORMAL {
  background: rgba(32, 120, 70, 0.12);
  color: var(--green);
}

.risk-badge.WATCH {
  background: rgba(158, 113, 20, 0.14);
  color: var(--yellow);
}

.risk-badge.CAUTION {
  background: rgba(214, 107, 31, 0.13);
  color: var(--orange);
}

.risk-badge.VET_RECOMMENDED,
.risk-badge.EMERGENCY {
  background: rgba(198, 66, 53, 0.14);
  color: var(--red);
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.history-item p {
  margin: 8px 0;
}

.plans {
  display: grid;
  gap: 12px;
}

.mail-preview {
  border: 1px solid rgba(41, 79, 225, 0.24);
  border-radius: 8px;
  background: #f4fbf8;
  padding: 14px;
  line-height: 1.6;
}

.mail-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  padding: 0 14px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.plan-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.plan-card.active-plan {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(41, 79, 225, 0.1);
}

.plan-card button {
  justify-self: start;
}

.data-table {
  display: grid;
  gap: 10px;
}

.data-table div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.data-table span {
  color: var(--muted);
  line-height: 1.55;
}

.report-box {
  min-height: 420px;
  max-height: 640px;
  overflow: auto;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 16px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  line-height: 1.7;
}

.platform-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.platform-map section {
  display: grid;
  gap: 10px;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.platform-map span {
  color: var(--muted);
  line-height: 1.55;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.legal-links a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

.bottom-nav {
  display: none;
}

.legal-document {
  width: min(860px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  line-height: 1.75;
}

.legal-document h1,
.legal-document h2 {
  letter-spacing: 0;
}

.legal-document h1 {
  margin: 0 0 12px;
}

.legal-document h2 {
  margin: 28px 0 8px;
  font-size: 20px;
}

.legal-back {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .grid.four,
  .platform-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    overflow: hidden;
    padding-bottom: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: -12px -12px 12px;
    padding: 12px;
    background: #2f5fbd;
    color: #fff;
    box-shadow: 0 10px 28px rgba(31, 64, 160, 0.18);
  }

  .mobile-header .brand-mark {
    box-shadow: 0 8px 18px rgba(12, 30, 88, 0.14);
  }

  .mobile-header .eyebrow {
    color: #dbe6ff;
  }

  .mobile-header h1 {
    color: #fff;
  }

  .mobile-header .icon-button {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .main {
    height: calc(100dvh - 72px - var(--safe-bottom));
    overflow-y: auto;
    padding: 12px 12px 24px;
    scroll-padding-bottom: 112px;
  }

  .topbar {
    display: none;
  }

  .hero,
  .grid.two,
  .form-grid,
  .url-input-row,
  .platform-map,
  .triage-check-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 14px;
    margin: 0 0 12px;
    padding: 18px;
    text-align: center;
    overflow: hidden;
  }

  .hero h3 {
    font-size: 27px;
    line-height: 1.12;
    margin: 4px auto 0;
    max-width: 320px;
  }

  .hero p {
    margin: 0 auto;
    font-size: 14px;
  }

  .mobile-hero-vector {
    display: block;
    width: min(250px, 78vw);
    max-height: 210px;
    margin: 4px auto 6px;
    object-fit: contain;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions > button {
    width: 100%;
    min-height: 48px;
    padding: 0 10px;
  }

  .status-card {
    padding: 14px;
  }

  .status-card h4 {
    color: var(--ink);
  }

  .phone-preview {
    display: none;
  }

  .onboarding-shot {
    max-height: 210px;
  }

  .grid {
    gap: 12px;
    margin-bottom: 12px;
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-card {
    min-height: 92px;
    padding: 13px;
  }

  .quick-card strong {
    font-size: 15px;
  }

  .quick-card span {
    font-size: 13px;
  }

  .status-mini {
    flex-direction: column;
  }

  .auth-grid {
    gap: 12px;
  }

  .auth-shot {
    max-height: 170px;
  }

  .auth-phone-card {
    padding: 0 18px 18px;
    background: linear-gradient(180deg, #2f5fbd 0 214px, #fff 214px);
  }

  .auth-visual {
    min-height: 214px;
    margin: 0 -18px 16px;
  }

  .triage-layout {
    align-items: start;
  }

  .triage-group summary {
    min-height: 50px;
    align-items: center;
    padding: 13px 14px;
  }

  .triage-check-grid label {
    min-height: 54px;
    padding: 12px;
    font-size: 15px;
    color: #1d2a54;
  }

  .triage-check-grid input {
    width: 20px;
    min-height: 20px;
  }

  .triage-action-bar {
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(216, 224, 255, 0.82);
    background: transparent;
  }

  .triage-action-bar .primary-action,
  .triage-action-bar .secondary-action {
    box-shadow: 0 8px 22px rgba(31, 64, 160, 0.16);
  }

  .result-card {
    scroll-margin-top: 84px;
  }

  .bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    z-index: 50;
    display: flex;
    width: min(100vw, 390px);
    max-width: 390px;
    overflow: hidden;
    transform: translateX(-50%);
    gap: 4px;
    padding: 8px 8px calc(8px + var(--safe-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 -12px 32px rgba(35, 49, 95, 0.12);
  }

  .bottom-item {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
  }

  .bottom-item.active {
    background: rgba(41, 79, 225, 0.12);
    color: var(--teal);
  }

  .bottom-item.primary-tab {
    background: var(--amber);
    color: #fff;
  }

  .bottom-item.primary-tab.active {
    background: var(--amber-dark);
    color: #fff;
  }
}

@media (max-width: 560px) {
  .hero,
  .card {
    padding: 14px;
  }

  .topbar,
  .section-heading,
  .history-item header {
    align-items: stretch;
    flex-direction: column;
  }

  .hero h3 {
    font-size: 24px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .symptom-grid,
  .data-table div,
  .metric-grid,
  .auth-provider-row {
    grid-template-columns: 1fr;
  }

  .youtube-preview {
    grid-template-columns: 1fr;
  }

  .action-list > button {
    width: 100%;
  }

  .video-preview {
    min-height: 210px;
  }

  input,
  select,
  textarea {
    min-height: 50px;
    font-size: 16px;
  }

  .section-heading {
    gap: 8px;
  }

  .save-state,
  .risk-badge {
    align-self: flex-start;
  }

  .report-box {
    min-height: 300px;
  }
}
