:root {
  --paper: #f8f8f3;
  --white: #fff;
  --ink: #253d34;
  --muted: #758077;
  --green: #214e3e;
  --light: #eaf0e7;
  --line: #e3e7df;
  --orange: #c37d54;
  --radius: 18px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
}
button,
input,
select {
  font: inherit;
}
button,
a,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
.dropzone:focus-within {
  outline: 3px solid #ba793f;
  outline-offset: 4px;
}
svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  background: var(--green);
  color: white;
  padding: 15px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 35px 22px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -1.3px;
  line-height: 1.05;
}
.brand-mark {
  background: var(--green);
  color: #f5f4dd;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
}
.brand-mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
  stroke: none;
}
.brand-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 4px;
  margin-top: 7px;
}
.brand-live i,
.local-tag i,
.eyebrow > span,
.live-dot {
  width: 6px;
  height: 6px;
  background: #6f9771;
  display: inline-block;
  border-radius: 50%;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8c958d;
  margin: 55px 12px 16px;
}
nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #69776e;
  text-align: left;
  font-size: 14px;
}
.nav-item:hover {
  background: #f4f6f1;
}
.nav-item.active {
  background: var(--light);
  color: var(--green);
  font-weight: 650;
}
.nav-arrow {
  margin-left: auto;
}
.nav-item:not(.active) .nav-arrow {
  display: none;
}
.sidebar-note {
  margin: 45px 0 0;
  position: relative;
  background: #f8f6ee;
  border-radius: 12px;
  padding: 20px 16px 18px;
  overflow: hidden;
}
.small-paw {
  display: block;
  color: #9baf90;
  margin-bottom: 12px;
}
.small-paw svg {
  width: 23px;
  height: 23px;
}
.sidebar-note strong {
  font-size: 12px;
  font-weight: 600;
}
.sidebar-note p {
  font-size: 11px;
  color: #7b8377;
  line-height: 1.8;
  margin-bottom: 0;
  max-width: 130px;
}
.note-doodle {
  position: absolute;
  right: -4px;
  bottom: -20px;
  font-size: 90px;
  color: #e8eadb;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
  display: grid;
  gap: 16px;
}
.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: #65766b;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  text-align: left;
}
.text-button:hover {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sidebar-bottom .text-button {
  justify-content: space-between;
  padding: 0 10px;
}
.sidebar-bottom .text-button:first-child {
  justify-content: flex-start;
}
.local-tag {
  border-top: 1px solid var(--line);
  padding: 20px 10px 0;
  font-size: 10px;
  color: #7f897c;
  display: flex;
  gap: 8px;
  align-items: center;
}
.app-shell {
  margin-left: 224px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  background: rgba(248, 248, 243, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.breadcrumb {
  font-size: 11px;
  color: #829087;
  display: flex;
  gap: 14px;
}
.breadcrumb span:last-child {
  color: var(--ink);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.private-note {
  font-size: 10px;
  color: #819080;
  display: flex;
  gap: 6px;
  align-items: center;
}
.private-note svg {
  width: 14px;
  height: 14px;
}
.language-button {
  background: none;
  border: 0;
  font-size: 11px;
  color: var(--ink);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
}
.icon-button {
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #849080;
  padding: 8px;
}
.icon-button svg {
  width: 18px;
  height: 18px;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 0 44px;
  outline: none;
}
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 300px;
  padding: 32px 15px 30px 0;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #7d8e78;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.eyebrow > span {
  width: 5px;
  height: 5px;
}
h1 {
  font-size: clamp(29px, 3.1vw, 46px);
  letter-spacing: -1.8px;
  font-weight: 600;
  line-height: 1.3;
  margin: 17px 0 13px;
}
.hero-copy > p,
.simple-hero > p {
  font-size: 13px;
  color: #788477;
  line-height: 1.95;
  margin: 0;
}
.hero-tags {
  display: flex;
  gap: 22px;
  margin-top: 23px;
  font-size: 10px;
  color: #6c806a;
}
.hero-tags > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-tags svg {
  width: 13px;
  height: 13px;
}
.hero-art {
  position: relative;
  min-width: 270px;
  height: 233px;
  margin-right: 26px;
}
.dog-portrait {
  position: absolute;
  right: 0;
  top: 5px;
  background: #fff;
  padding: 9px 9px 0;
  transform: rotate(5deg);
  box-shadow: 0 9px 22px #31482d10;
  width: 170px;
  border: 1px solid #e9eadf;
}
.dog-portrait img {
  width: 150px;
  height: 157px;
  object-fit: cover;
  display: block;
}
.dog-portrait > span {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 13px;
  display: block;
  text-align: center;
  padding: 11px 0;
  color: #6d7969;
}
.cat-portrait {
  position: absolute;
  bottom: 17px;
  left: 9px;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  object-fit: cover;
  border: 7px solid var(--paper);
}
.hero-star {
  position: absolute;
  font-size: 62px;
  color: #bac89e;
  left: 40px;
  top: 4px;
  font-weight: 300;
}
.photo-label {
  position: absolute;
  font-size: 7px;
  letter-spacing: 1.3px;
  bottom: 0;
  right: -4px;
  color: #8a967c;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(230px, 1fr);
  gap: 24px;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
}
.panel-heading,
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 23px;
}
.panel-heading > div,
.results-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.3px;
}
.section-number {
  font-size: 10px;
  font-weight: 600;
  color: #98a48d;
  letter-spacing: 1px;
}
.subtle {
  font-size: 11px;
  line-height: 1.8;
  color: #84907f;
}
.species-picker {
  display: flex;
  gap: 11px;
  margin-bottom: 18px;
}
.species {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #7d8778;
  padding: 11px 16px;
  flex: 1;
  min-height: 44px;
  font-size: 12px;
}
.species.active {
  background: #f1f5ec;
  border-color: #7e9479;
  color: var(--green);
}
.species > span:first-child {
  font-size: 21px;
}
.species svg {
  width: 14px;
  height: 14px;
}
.species:not(.active) svg {
  visibility: hidden;
}
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #b5c3ab;
  background: #fbfcf8;
  border-radius: 11px;
  min-height: 205px;
  cursor: pointer;
  padding: 22px;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-align: center;
}
.dropzone:hover,
.dropzone.dragging {
  border-color: var(--green);
  background: #f1f5ea;
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone strong {
  font-size: 14px;
  font-weight: 500;
  margin-top: 15px;
}
.dropzone > span:not(.upload-icon) {
  font-size: 11px;
  color: #82907c;
  margin-top: 9px;
}
.dropzone small {
  font-size: 9px;
  color: #8a9684;
  margin-top: 18px;
}
.upload-icon {
  width: 43px;
  height: 43px;
  background: #edf2e7;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #708465;
}
.upload-icon svg {
  width: 21px;
  height: 21px;
}
.examples {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 15px 0 0;
  font-size: 10px;
  color: #89927e;
}
.sample-photo {
  display: flex;
  gap: 5px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 3px 9px 3px 3px;
  color: #62745b;
  font-size: 9px;
}
.sample-photo img {
  width: 21px;
  height: 21px;
  object-fit: cover;
  border-radius: 50%;
}
.sample-photo > span:last-child {
  margin-left: 5px;
}
.advanced {
  margin-top: 23px;
  border-top: 1px solid #edf0e8;
  padding-top: 15px;
}
.advanced summary {
  font-size: 11px;
  color: #7c8976;
  cursor: pointer;
  list-style-position: inside;
}
.advanced-content {
  margin-top: 17px;
  display: grid;
  gap: 8px;
}
.advanced-content > label {
  font-size: 11px;
}
.advanced p {
  margin: 0;
}
.advanced select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  line-height: 1.6;
}
.check-label input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}
.run-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.primary-button {
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  min-height: 46px;
  padding: 13px 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s;
}
.primary-button:hover:not(:disabled) {
  background: #163c2d;
}
.primary-button svg {
  width: 17px;
  height: 17px;
}
.run-row .primary-button {
  flex: 1;
}
.primary-button svg:last-child {
  margin-left: auto;
}
.primary-button svg:first-child {
  margin-right: auto;
}
.secondary-button {
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #fff;
  font-size: 12px;
}
.upload-footnote {
  text-align: center;
  font-size: 9px;
  color: #98a18d;
  margin: 12px 0 0;
}
.tips-panel {
  border: 1px solid #e5e8dc;
  background: #eff1e7;
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}
.tips-panel .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.tips-panel > h2 {
  font-size: 28px;
  line-height: 1.5;
  letter-spacing: -0.7px;
  margin: 16px 0 27px;
  font-weight: 500;
}
.tip {
  display: flex;
  gap: 13px;
  margin-bottom: 23px;
}
.tip > span {
  border: 1px solid #d4ddc8;
  color: #819674;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 9px;
}
.tip strong {
  font-size: 11px;
  font-weight: 550;
}
.tip p {
  font-size: 10px;
  color: #87917c;
  line-height: 1.9;
  margin: 7px 0 0;
  max-width: 210px;
}
.tips-footer {
  border-top: 1px solid #dde3d3;
  padding-top: 20px;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  color: #8d9c7b;
}
.tips-footer svg {
  width: 16px;
  height: 16px;
}
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  padding: 15px 0 0;
  color: #6c7e65;
}
.selection-bar .text-button {
  font-size: 10px;
}
.previews {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.previews:empty {
  display: none;
}
.preview-item {
  position: relative;
  width: 58px;
  height: 58px;
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.remove-photo {
  position: absolute;
  right: -4px;
  top: -5px;
  background: white;
  border: 1px solid #dde3d6;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 3px;
  color: #64755e;
}
.remove-photo svg {
  width: 12px;
  height: 12px;
}
.results-section {
  margin-top: 35px;
}
.results-heading {
  margin-bottom: 14px;
}
.count-badge {
  background: #e9eee2;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 9px;
  color: #7b8d6e;
}
.results-heading h2 {
  font-size: 17px;
}
.results-heading .text-button {
  font-size: 10px;
}
.results-heading svg {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}
.empty-state {
  border: 1px dashed #d9dfd1;
  border-radius: var(--radius);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  grid-column: 1/-1;
  background: #f9faf6;
}
.empty-paw {
  border: 1px solid #e5e9dd;
  background: #f2f5eb;
  color: #acb99c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 10px;
}
.empty-paw svg {
  width: 23px;
  height: 23px;
}
.empty-state h3 {
  font-size: 13px;
  font-weight: 500;
  margin: 5px 0 10px;
  color: #748368;
}
.empty-state p {
  font-size: 10px;
  margin: 0;
  color: #94a087;
  line-height: 1.8;
}
.result-disclaimer {
  font-size: 9px;
  color: #929d87;
  line-height: 1.8;
  margin: 13px 0 0;
}
.status-line {
  font-size: 12px;
  line-height: 1.6;
  color: #5e7654;
  white-space: pre-line;
  margin: 14px 0 0;
  padding: 11px 13px;
  border: 1px solid #e2e9de;
  border-left: 3px solid #8bab93;
  border-radius: 9px;
  background: #f7faf5;
}
.status-line:empty {
  display: none;
  padding: 0;
  margin: 0;
  border: 0;
}
.status-line.error {
  color: #a54838;
  background: #fbefeb;
  border-color: #f2ded8;
  border-left-color: #c4554d;
  border-radius: 9px;
  padding: 11px 13px;
}
.photo-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.result-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.result-photo {
  width: 100%;
  height: 155px;
  object-fit: cover;
  display: block;
}
.result-content {
  padding: 16px;
}
.result-file {
  font-size: 9px;
  color: #8b9582;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 12px;
}
.result-content h3 {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 550;
  margin: 5px 0 7px;
  overflow-wrap: anywhere;
}
.result-model {
  font-size: 9px;
  letter-spacing: 0.4px;
  color: #839377;
}
.result-content p {
  font-size: 10px;
  color: #8a9580;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.result-content details {
  margin-top: 13px;
  font-size: 10px;
  color: #7d8b71;
}
.result-content details p {
  white-space: pre-wrap;
}
.result-content summary {
  cursor: pointer;
}
.result-tag {
  font-size: 9px;
  display: inline-block;
  background: #eef3e7;
  color: #6d825b;
  padding: 4px 7px;
  border-radius: 5px;
}
.result-tag.error {
  background: #fbefeb;
  color: #a54838;
}
.model-result + .model-result {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 12px;
}
progress {
  width: 100%;
  height: 4px;
  accent-color: var(--green);
  margin: 8px 0 18px;
}
.simple-hero {
  padding: 46px 0 30px;
}
.media-panel {
  margin-bottom: 25px;
}
.dropzone.compact {
  min-height: 155px;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}
.media-grid video,
.analysis-frame {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 11px;
  background: #17231c;
}
.media-label {
  font-size: 10px;
  color: #8b9583;
  display: block;
  margin: 0 0 8px;
}
.media-grid > div:has(video[hidden]):not(:has(img:not([hidden]))) {
  display: none;
}
.frame-placeholder {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: #f3f5ee;
  border-radius: 11px;
  color: #93a085;
  font-size: 11px;
  text-align: center;
  padding: 20px;
}
.frame-placeholder svg {
  width: 34px;
  height: 34px;
}
.animal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.animal-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.animal-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.animal-card p {
  color: #7f8a75;
  font-size: 12px;
  line-height: 1.8;
}
.live-dot {
  margin-right: 2px;
}
.camera-source video {
  margin-top: 22px;
}
footer {
  margin: 35px 0 0;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  color: #99a18e;
}
footer > span {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-star {
  font-size: 14px;
  color: #a1b68b;
}
footer a:hover {
  text-decoration: underline;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  max-width: 470px;
  width: calc(100% - 30px);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 80px #17382920;
}
dialog::backdrop {
  background: #152e2766;
  backdrop-filter: blur(3px);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
}
dialog h2 {
  font-size: 25px;
  margin: 22px 0;
}
dialog ol {
  padding-left: 20px;
  font-size: 13px;
  line-height: 2.1;
}
dialog p {
  font-size: 12px;
  line-height: 1.9;
}
dialog .primary-button {
  width: 100%;
  margin-top: 22px;
}
@media (min-width: 1550px) {
  main {
    padding: 0 64px;
  }
  .hero {
    min-height: 330px;
  }
  .hero-art {
    margin-right: 65px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
    padding: 30px 17px;
  }
  .app-shell {
    margin-left: 195px;
  }
  main {
    padding: 0 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .hero-art {
    min-width: 230px;
    margin-right: 0;
  }
  .hero-copy h1 {
    font-size: 32px;
  }
  .hero {
    min-height: 280px;
  }
  .workspace-grid {
    gap: 18px;
    grid-template-columns: minmax(0, 1.7fr) minmax(210px, 1fr);
  }
  .panel {
    padding: 21px;
  }
  .tips-panel {
    padding: 26px 20px;
  }
  .tips-panel > h2 {
    font-size: 24px;
  }
  .photo-results {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-copy .eyebrow {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    width: 175px;
    padding: 27px 12px;
  }
  .brand {
    font-size: 23px;
    gap: 8px;
  }
  .brand-mark {
    width: 37px;
    height: 37px;
  }
  .app-shell {
    margin-left: 175px;
  }
  .private-note {
    display: none;
  }
  .hero-art {
    min-width: 170px;
    height: 220px;
  }
  .dog-portrait {
    width: 140px;
  }
  .dog-portrait img {
    width: 120px;
    height: 135px;
  }
  .cat-portrait {
    width: 80px;
    height: 80px;
    left: -12px;
    bottom: 15px;
  }
  .hero-star {
    left: -10px;
    font-size: 43px;
  }
  .photo-label {
    font-size: 6px;
    right: -10px;
  }
  .hero-copy h1 {
    font-size: 28px;
  }
  .hero-copy > p {
    font-size: 12px;
  }
  .hero-tags {
    gap: 13px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .tips-panel {
    display: none;
  }
  .hero {
    min-height: 260px;
  }
  .media-grid {
    grid-template-columns: 1fr;
  }
  .animal-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sidebar-note {
    padding: 17px 12px;
  }
  .sidebar-note strong {
    font-size: 11px;
  }
  .nav-item {
    font-size: 12px;
    gap: 9px;
    padding: 13px 10px;
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 17px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .brand {
    font-size: 24px;
  }
  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }
  .brand-mark svg {
    width: 23px;
    height: 23px;
  }
  .brand-live {
    font-size: 7px;
    letter-spacing: 3px;
    margin-top: 4px;
  }
  .sidebar nav {
    display: flex;
    margin-top: 21px;
    gap: 0;
    justify-content: space-between;
  }
  .nav-item {
    padding: 13px 10px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    flex: 1;
    justify-content: center;
    font-size: 12px;
    gap: 7px;
    min-width: 0;
  }
  .nav-item svg {
    width: 17px;
    height: 17px;
  }
  .nav-item.active {
    background: transparent;
    border-bottom-color: var(--green);
  }
  .nav-label,
  .sidebar-note,
  .sidebar-bottom,
  .nav-arrow {
    display: none;
  }
  .app-shell {
    margin-left: 0;
  }
  .topbar {
    position: absolute;
    top: 15px;
    right: 13px;
    height: 40px;
    background: none;
    padding: 0;
    border: 0;
  }
  .breadcrumb {
    display: none;
  }
  .top-actions {
    gap: 4px;
  }
  .language-button {
    font-size: 10px;
    gap: 6px;
  }
  .icon-button {
    padding: 10px;
  }
  .hero {
    min-height: 245px;
    padding: 28px 0 22px;
    gap: 5px;
  }
  .hero-copy {
    position: relative;
    z-index: 1;
  }
  .hero-copy h1 {
    font-size: 28px;
    letter-spacing: -1.1px;
    max-width: 245px;
  }
  .hero-copy .eyebrow {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .hero-copy > p {
    font-size: 11px;
    line-height: 1.95;
  }
  .hero-tags {
    font-size: 8px;
    gap: 10px;
    margin-top: 17px;
  }
  .hero-tags svg {
    width: 10px;
    height: 10px;
  }
  .hero-art {
    min-width: 96px;
    align-self: center;
    height: 190px;
    margin-right: 0;
    opacity: 0.9;
  }
  .dog-portrait {
    width: 90px;
    right: 0;
    top: 24px;
    padding: 5px 5px 0;
  }
  .dog-portrait img {
    width: 78px;
    height: 103px;
  }
  .dog-portrait > span {
    font-size: 7px;
    padding: 6px 0;
  }
  .cat-portrait {
    width: 53px;
    height: 53px;
    border-width: 4px;
    left: -22px;
    bottom: 2px;
  }
  .hero-star {
    left: -4px;
    top: -4px;
    font-size: 31px;
  }
  .photo-label {
    display: none;
  }
  main {
    padding: 0 19px;
  }
  .panel {
    padding: 20px;
    border-radius: 14px;
  }
  .panel-heading {
    margin-bottom: 18px;
  }
  h2 {
    font-size: 15px;
  }
  .dropzone {
    min-height: 190px;
    padding: 20px 10px;
  }
  .dropzone strong {
    font-size: 13px;
  }
  .dropzone small {
    font-size: 8px;
  }
  .examples {
    gap: 7px;
    font-size: 9px;
  }
  .sample-photo {
    font-size: 9px;
    padding-right: 7px;
  }
  .tips-panel {
    display: none;
  }
  .results-section {
    margin-top: 28px;
  }
  .results-heading {
    flex-wrap: wrap;
  }
  .results-heading h2 {
    font-size: 15px;
  }
  .empty-state {
    padding: 22px 16px;
  }
  .photo-results {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .result-photo {
    height: 120px;
  }
  .result-content {
    padding: 12px;
  }
  .result-content h3 {
    font-size: 13px;
  }
  .result-content p {
    font-size: 9px;
  }
  .result-model {
    font-size: 8px;
  }
  .result-disclaimer {
    font-size: 8px;
  }
  .simple-hero {
    padding: 31px 0 25px;
  }
  .simple-hero h1 {
    font-size: 28px;
  }
  .simple-hero > p {
    font-size: 12px;
  }
  .simple-hero .eyebrow {
    font-size: 8px;
  }
  .media-grid {
    gap: 17px;
  }
  .frame-placeholder {
    min-height: 190px;
  }
  .animal-grid {
    grid-template-columns: 1fr;
  }
  .run-row .primary-button {
    font-size: 12px;
    padding: 12px 15px;
  }
  footer {
    font-size: 8px;
    gap: 10px;
    line-height: 1.8;
  }
  footer > span {
    gap: 7px;
  }
  footer > span > span:last-child {
    max-width: 125px;
  }
  .primary-button {
    min-height: 46px;
  }
  .text-button,
  .language-button {
    min-height: 32px;
  }
  dialog {
    padding: 31px 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Keep instructions readable for everyday use. */
.sidebar {
  overflow-y: auto;
}
.sidebar-note {
  flex-shrink: 0;
}
.hero-copy > p,
.simple-hero > p {
  font-size: 14px;
}
.dropzone strong {
  font-size: 16px;
}
.dropzone > span:not(.upload-icon) {
  font-size: 13px;
}
.dropzone small {
  font-size: 11px;
}
.subtle,
.upload-footnote,
.result-disclaimer,
.text-button,
.examples,
.advanced summary,
.advanced-content > label,
.species,
.primary-button {
  font-size: 12px;
}
.tip strong {
  font-size: 13px;
}
.tip p {
  font-size: 12px;
}
.tips-footer {
  font-size: 11px;
}
.empty-state h3 {
  font-size: 15px;
}
.empty-state p {
  font-size: 12px;
}
.result-content p,
.result-content details {
  font-size: 12px;
}
.result-file,
.result-model,
.result-tag {
  font-size: 11px;
}
.sample-photo {
  font-size: 11px;
}
.sidebar-note p,
.local-tag {
  font-size: 11px;
}
.panel-heading .subtle {
  font-size: 11px;
}
.result-photo {
  height: 175px;
}
.frame-placeholder {
  font-size: 13px;
}
.media-label {
  font-size: 12px;
}
.check-label {
  min-height: 38px;
}
.sample-photo {
  min-height: 36px;
}
.remove-photo {
  width: 28px;
  height: 28px;
}
.preview-item {
  margin: 3px;
}
.hero-tags {
  font-size: 11px;
}
.private-note {
  font-size: 11px;
  color: #667960;
}
footer {
  font-size: 11px;
}
footer > span {
  flex-wrap: wrap;
}
.tip p,
.subtle,
.upload-footnote,
.result-disclaimer,
.empty-state p,
.result-content p {
  color: #6c7c65;
}
@media (max-width: 600px) {
  .hero-copy > p {
    font-size: 12px;
  }
  .hero-tags {
    font-size: 9px;
  }
  .dropzone strong {
    font-size: 15px;
  }
  .dropzone small {
    font-size: 10px;
  }
  .examples {
    font-size: 11px;
  }
  .photo-results {
    grid-template-columns: 1fr;
  }
  .result-photo {
    height: 210px;
  }
  .result-content {
    padding: 17px;
  }
  .result-content h3 {
    font-size: 18px;
  }
  .result-disclaimer {
    font-size: 11px;
  }
  .sidebar {
    overflow: visible;
  }
  .media-panel .panel-heading {
    align-items: flex-start;
  }
  .media-panel .panel-heading > div {
    min-width: 0;
  }
  .media-panel .panel-heading > .text-button {
    font-size: 11px;
  }
  footer {
    font-size: 10px;
  }
  .tips-panel {
    display: none;
  }
  .selection-bar {
    font-size: 12px;
  }
  .hero-copy .eyebrow {
    font-size: 6px;
  }
  .hero-art {
    min-width: 80px;
  }
  .cat-portrait {
    left: -10px;
  }
  .hero-copy h1 {
    font-size: 27px;
  }
}
@media (max-width: 600px) {
  .topbar {
    z-index: 30;
  }
}
/* Compact task layout with model choices always visible. */
.page-heading {
  padding: 30px 0 24px;
}
.page-heading h1 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.8px;
}
.workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.model-settings {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.model-settings label {
  font-size: 12px;
  color: var(--ink);
}
.model-settings select {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.model-settings > div {
  display: grid;
  gap: 9px;
}
.model-settings .check-label {
  margin: 0;
}
.model-settings p {
  margin: 0;
}
.results-section {
  margin-top: 0;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.photo-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.simple-hero {
  padding: 30px 0 24px;
}
.simple-hero h1 {
  margin: 0;
  font-size: 30px;
}
@media (max-width: 1100px) {
  .photo-results {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 850px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .page-heading {
    padding: 26px 0 20px;
  }
  .page-heading h1,
  .simple-hero h1 {
    font-size: 27px;
  }
  .results-section {
    padding: 20px;
  }
}
.result-details {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.result-details h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
}
.result-details p {
  white-space: pre-wrap;
  margin: 0;
  overflow-wrap: anywhere;
}
.result-probability {
  font-variant-numeric: tabular-nums;
  color: var(--green) !important;
}
.photo-results.comparing {
  grid-template-columns: 1fr;
}
.comparison-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.comparison-blocks .model-result {
  min-width: 0;
}
.comparison-blocks .model-result + .model-result {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.comparison-blocks .result-model {
  margin: 0 0 8px;
}
@media (max-width: 600px) {
  .comparison-blocks {
    grid-template-columns: 1fr;
  }
  .comparison-blocks .model-result + .model-result {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}
.comparison-table caption {
  text-align: left;
  font-weight: 600;
  padding: 4px 0 14px;
}
.comparison-table th,
.comparison-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 9px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.comparison-table thead th:first-child,
.comparison-table tbody th {
  width: 40px;
  color: var(--muted);
  font-weight: 400;
}
.comparison-table th small,
.table-probability {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 400;
}
.table-probability {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.comparison-table td strong {
  font-weight: 500;
}
.comparison-explanations {
  margin-top: 20px;
}
.comparison-explanations .model-result + .model-result {
  padding-top: 15px;
  margin-top: 15px;
}
.comparison-explanations .result-details {
  border: 0;
  margin-top: 8px;
  padding-top: 0;
}
.comparing .result-photo {
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #f3f5ee;
}
.tracking-summary {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.tracking-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px 13px;
  margin: 16px 0;
  font-size: 12px;
  line-height: 1.7;
}
.tracking-facts dt {
  color: var(--muted);
}
.tracking-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tracking-candidates {
  margin: 10px 0;
  padding-left: 20px;
  font-size: 12px;
}
.tracking-candidates li {
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.tracking-candidates li strong {
  display: block;
  color: var(--green);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.animal-card .tracked-breed {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.animal-card .result-details p {
  white-space: pre-wrap;
}
@media (max-width: 600px) {
  .comparison-table th,
  .comparison-table td {
    padding: 10px 6px;
  }
}
.comparison-table thead th:first-child {
  width: 48px;
  white-space: nowrap;
}
.tracking-details {
  margin-top: 24px;
  min-width: 0;
}
.tracking-table-scroll {
  max-width: 100%;
  max-height: 340px;
  overflow: auto;
  margin-bottom: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tracking-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  line-height: 1.7;
}
.tracking-data-table caption {
  padding: 14px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.tracking-data-table th,
.tracking-data-table td {
  min-width: 115px;
  max-width: 300px;
  vertical-align: top;
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.tracking-data-table th {
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: #edf2e8;
  z-index: 1;
  font-weight: 500;
}
.tracking-data-table td {
  white-space: pre-wrap;
}
.tracking-raw h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 15px;
}
.tracking-raw pre {
  font-size: 11px;
  line-height: 1.7;
  max-height: 330px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf5;
  margin: 0;
}
.tracking-details {
  margin-bottom: 24px;
}
.pipeline-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pipeline-options > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.pipeline-options label {
  font-size: 12px;
}
.pipeline-options select {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.pipeline-options .check-label {
  margin: 0;
}
.class-filter {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.class-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
}
.class-options label { cursor: pointer; }
.detection-counts { margin: 24px 0; padding: 20px; }
.detection-counts h2 { font-size: 18px; margin: 0; }
.count-totals { font-weight: 600; }
.pipeline-model-note {
  grid-column: 1 / -1;
  margin: 0;
}
@media (max-width: 600px) {
  .pipeline-options {
    grid-template-columns: 1fr;
  }
}
/* Species exploration reuses the existing local media panels and cards. */
.species-controls { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; align-items: end; }
.species-controls label { display: grid; gap: 8px; min-width: 180px; flex: 1; }
.species-controls select { padding: 10px 12px; border: 1px solid #cbd6cd; border-radius: 8px; background: white; color: inherit; font: inherit; }
.species-observation { padding: 20px; }
.species-observation h3 { margin: 8px 0; }
.species-observation ol { padding-left: 20px; }
.species-observation li { margin: 12px 0; overflow-wrap: anywhere; }

/* Unified monitor: source on the left, observations on the right. */
.monitor-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.monitor-heading h1 { margin:6px 0 10px; }
.monitor-badge { font-size:12px; border:1px solid var(--line); background:#edf1e8; color:#52644d; border-radius:20px; padding:9px 14px; white-space:nowrap; }
.monitor-badge.is-live { background:#e1f2e8; color:#206244; }
.monitor-source-bar, .monitor-run { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:20px 0; }
.monitor-upload { cursor:pointer; position:relative; display:inline-flex; align-items:center; }
.monitor-upload input { position:absolute; width:1px; height:1px; opacity:0; }
.monitor-upload:focus-within { outline:3px solid #aec8ac; outline-offset:3px; }
.monitor-workspace { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(225px,1fr); gap:18px; align-items:start; }
.monitor-view { padding:22px; position:sticky; top:24px; min-width:0; }
.monitor-view-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:16px; }
.monitor-view-heading h2, .monitor-card h2 { margin:0; font-size:17px; }
.monitor-screen { background:#172f28; border-radius:10px; min-height:270px; display:grid; place-items:center; overflow:hidden; }
.monitor-screen canvas { display:block; width:100%; height:auto; }
.monitor-screen.has-frame { position:relative; min-height:0; width:min(100%, calc(70vh * var(--monitor-aspect))); aspect-ratio:var(--monitor-aspect); margin-inline:auto; }
.monitor-screen.has-frame canvas { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.monitor-screen [hidden], #page-monitor [hidden] { display:none !important; }
#monitor-placeholder { color:#c5d6c8; text-align:center; padding:70px 25px; font-size:13px; }
#monitor-placeholder svg { width:38px; height:38px; margin-bottom:16px; }
.monitor-run .subtle { margin-left:auto; }
.monitor-view .subtle, .monitor-card .subtle { font-size:12px; line-height:1.8; }
.monitor-insights { display:grid; gap:16px; min-width:0; }
.monitor-card { padding:22px; min-width:0; }
.monitor-card > h2 { margin-bottom:16px; }
.monitor-totals { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:5px 0 15px; }
.monitor-totals > div { display:grid; gap:5px; background:#f0f4e9; border-radius:9px; padding:14px; }
.monitor-totals strong { font-size:30px; font-weight:500; }
.monitor-totals span { font-size:12px; color:#61715b; }
.monitor-count-list { display:grid; grid-template-columns:1fr 1fr; gap:10px 20px; }
.monitor-count-list > div { display:flex; justify-content:space-between; font-size:13px; padding:5px 0; border-bottom:1px solid #edf0e7; }
.monitor-pet, .monitor-event { border-top:1px solid var(--line); padding:14px 0; }
.monitor-pet:first-child, .monitor-event:first-child { border-top:0; padding-top:0; }
.monitor-pet h3, .monitor-event h3 { margin:4px 0 8px; font-size:14px; }
.monitor-pet-breed { font-size:14px; font-weight:500; margin:7px 0; }
.monitor-candidates { font-size:11px; line-height:1.9; padding-left:20px; color:#65705f; }
.monitor-event p { font-size:12px; line-height:1.8; }
.monitor-event .text-button { font-size:12px; padding:8px 0; }
.monitor-review-status { background:#f3eedf; border-radius:5px; padding:5px 9px; width:fit-content; }
.monitor-area { display:flex; gap:15px; justify-content:space-between; padding:12px; background:#f4f5e9; border-left:3px solid #d9b750; border-radius:5px; font-size:12px; }
.monitor-region-heading { margin:20px 0 8px; font-size:14px; }
.monitor-region-record { border-top:1px solid var(--line); padding:12px 0; }
.monitor-region-record summary { cursor:pointer; font-size:13px; }
.monitor-region-preview { display:block; max-width:100%; max-height:320px; margin:10px auto; border-radius:6px; }
.monitor-capability-note { font-size:12px; line-height:1.8; color:#7b725b; }
.monitor-settings { border-top:1px solid var(--line); padding-top:20px; margin-top:22px; }
.monitor-settings summary { cursor:pointer; font-size:13px; color:var(--green); }
.monitor-fields { display:grid; gap:18px; margin:20px 0; }
.monitor-fields label { display:grid; gap:8px; font-size:12px; }
.monitor-fields .check-label { display:flex; }
.monitor-fields select, #monitor-evidence select { padding:10px; border:1px solid var(--line); border-radius:7px; background:white; font:inherit; color:var(--ink); }
#monitor-filter { border:1px solid var(--line); border-radius:8px; font-size:12px; }
#monitor-evidence { margin-top:22px; }
.monitor-evidence-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
.monitor-evidence-grid figure { margin:0; }
.monitor-evidence-grid img { width:100%; border-radius:8px; }
@media(max-width:780px) { .monitor-workspace { grid-template-columns:1fr; } .monitor-view { position:static; } .monitor-insights { grid-template-columns:1fr 1fr; } }
@media(max-width:600px) { .monitor-insights { grid-template-columns:1fr; } .monitor-heading { align-items:flex-start; flex-direction:column; gap:0; } .monitor-source-bar { gap:10px; } .monitor-source-bar > button, .monitor-upload { justify-content:center; flex:1 1 45%; } .monitor-view, .monitor-card { padding:16px; } .monitor-screen { min-height:190px; } }

.monitor-window-reference { display:block; width:100%; max-width:760px; border-radius:8px; margin:18px 0; }
/* Keep the monitor large while retaining the single source/results workspace. */
.monitor-workspace { grid-template-columns:minmax(0,2fr) minmax(225px,1fr); }
.monitor-heading h1 { font-size:36px; }
@media(max-width:780px) { .monitor-workspace { grid-template-columns:1fr; } }

.monitor-fields input[type="number"] { width:100%; padding:10px; border:1px solid var(--line); border-radius:7px; background:white; color:var(--ink); font:inherit; }

.monitor-fields select, .monitor-fields input[type="number"] { width:100%; min-width:0; }

/* Focused web client for the shared Python inference API. */
.web-main { max-width: 1480px; padding: 28px 38px 44px; margin: 0 auto; }
.web-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin: 12px 0 28px; }
.web-heading h1 { margin: 7px 0 8px; font-size: clamp(28px, 3vw, 40px); letter-spacing:-1.2px; }
.web-heading p:not(.eyebrow) { margin:0; color:var(--muted); line-height:1.7; }
.heading-paw { font-size:58px; opacity:.55; }
.web-grid { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(0,1.5fr); gap:20px; align-items:start; }
.source-panel,.preview-panel,.result-panel { padding:22px; min-width:0; }
.source-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin:16px 0; }
.source-tab { min-height:42px; border:1px solid var(--line); border-radius:10px; color:var(--muted); background:#fff; font-size:12px; transition:background .15s, border-color .15s, color .15s; }
.source-tab:hover:not(.active) { border-color:#cbdacb; color:var(--ink); }
.source-tab.active { color:var(--green); background:var(--light); border-color:#cbdacb; font-weight:650; }
.web-app .dropzone { min-height:168px; }
.web-app .upload-icon { font-size:24px; font-weight:700; }
.camera-controls { background:#f6f7f2; border-radius:12px; padding:14px; margin:14px 0; }
.camera-controls p { color:var(--muted); line-height:1.6; margin:0 0 12px; }
.camera-buttons,.action-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.selected-name { min-height:20px; margin:14px 0; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.action-row .primary-button { flex:1; justify-content:space-between; }
.web-app .primary-button,.web-app .secondary-button { min-height:44px; }
.api-state { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:11px; white-space:nowrap; }
.api-state i { width:8px; height:8px; border-radius:50%; background:#c49b3f; }
.api-state.ready i { background:#4b9a62; }
.api-state.error i { background:#c4554d; }
.preview-stage { position:relative; display:grid; place-items:center; width:100%; aspect-ratio:var(--media-aspect, 16 / 9); min-height:270px; max-height:68vh; overflow:hidden; border-radius:12px; background:#172f28; color:#fff; }
.preview-stage img,.preview-stage video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.preview-stage canvas { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; pointer-events:none; }
#preview-placeholder { text-align:center; color:#d9e4dc; padding:22px; }
#preview-placeholder span { display:block; font-size:44px; }
#preview-placeholder p { margin:10px 0 0; }
.preview-footer { display:flex; justify-content:space-between; gap:14px; margin-top:13px; color:var(--muted); font-size:11px; }
.privacy-note,.result-disclaimer,.dog-caveat { color:var(--muted); font-size:11px; line-height:1.65; }
.result-panel { margin-top:20px; }
.web-results { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:12px; align-items:start; }
.web-empty { grid-column:1/-1; min-height:150px; display:grid; place-content:center; text-align:center; color:var(--muted); border:1px dashed var(--line); border-radius:13px; background:#fbfcf8; padding:24px; }
.web-empty span { font-size:32px; }
.web-empty h3 { color:var(--ink); margin:8px 0 2px; }
.web-empty p { margin:3px; }
.dog-result-card { border:1px solid var(--line); border-radius:13px; padding:16px; background:#fff; min-width:0; transition:border-color .15s, box-shadow .15s; }
.dog-result-card:hover { border-color:#d7ded3; box-shadow:0 2px 10px rgba(33, 60, 45, 0.05); }
.dog-result-top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; padding-bottom:11px; border-bottom:1px solid var(--line); }
.dog-result-top h3 { margin:0; font-size:15px; letter-spacing:-0.2px; }
.preview-badge { display:inline-flex; padding:4px 9px; border-radius:999px; background:#fff1dc; color:#755422; font-size:10px; font-weight:600; white-space:nowrap; }
.result-pill { border-radius:999px; background:var(--light); color:var(--green); padding:7px 10px; font-size:11px; font-weight:650; }
.result-pill.uncertain { background:#f8f1df; color:#785d21; }
.dog-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; align-content:start; }
.dog-metric { display:flex; flex-direction:column; justify-content:space-between; gap:6px; min-height:64px; padding:10px; border-radius:9px; background:#f7f8f4; min-width:0; }
.dog-metric span,.dog-metric strong { display:block; }
.dog-metric span { color:var(--muted); font-size:10px; letter-spacing:0.3px; margin-bottom:0; }
.dog-metric strong { font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.dog-metric:first-child { background:var(--light); }
.dog-metric:first-child strong { color:var(--green); font-size:13px; }
.dog-metric:last-child:nth-child(odd) { grid-column:1 / -1; }
.candidate-list { color:var(--muted); font-size:11px; line-height:1.6; }
.breed-candidate-panel { margin-top:9px; padding:10px 12px; border:1px solid #e0e8dc; border-radius:10px; background:#fbfcf9; }
.breed-candidate-panel > strong { display:block; margin-bottom:6px; color:#34483b; font-size:11px; }
.breed-candidate-panel ol { display:grid; gap:5px; margin:0; padding-left:20px; }
.breed-candidate-panel li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; color:#3d4c40; font-size:11px; }
.breed-candidate-panel li span:nth-child(2) { color:#68766b; font-variant-numeric:tabular-nums; }
.breed-candidate-panel li small { color:#667569; font-size:10px; }
.breed-candidate-panel > small { display:block; margin-top:7px; color:#79847b; font-size:9px; line-height:1.45; }
.behavior-card { margin:12px 0; padding:13px; border:1px solid #dfe8dc; border-radius:11px; background:#fbfcf9; }
.behavior-card h4 { margin:0 0 10px; font-size:13px; color:var(--green); }
.behavior-movement { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; margin-bottom:9px; padding:9px 10px; border-left:3px solid #92b69d; border-radius:7px; background:#f0f4ed; }
.behavior-movement span { color:var(--muted); font-size:10px; }
.behavior-movement strong { font-size:12px; text-align:right; overflow-wrap:anywhere; }
.behavior-cues-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.behavior-cue { min-width:0; padding:8px 9px; border-radius:8px; background:#f0f4ed; }
.behavior-cue span,.behavior-cue strong { display:block; overflow-wrap:anywhere; }
.behavior-cue span { color:var(--muted); font-size:10px; margin-bottom:4px; }
.behavior-cue strong { font-size:12px; }
.behavior-signals { margin-top:11px; font-size:11px; }
.behavior-signals > strong { display:block; margin-bottom:6px; }
.behavior-signals p { color:var(--muted); margin:0; }
.behavior-badges { display:flex; flex-wrap:wrap; gap:6px; }
.behavior-badge { display:inline-flex; padding:5px 8px; border-radius:999px; background:#fff1dc; color:#755422; font-size:10px; }
.behavior-tendency { margin-top:11px; padding:9px 10px; border-left:3px solid #92b69d; background:#f6f8f3; }
.behavior-tendency strong { font-size:11px; }
.behavior-tendency p { margin:5px 0 0; color:#58665c; font-size:11px; line-height:1.6; }
.behavior-disclaimer { display:block; margin-top:9px; color:var(--muted); font-size:10px; line-height:1.6; }
.screening-note { display:flex; flex-direction:column; gap:5px; margin:0 0 13px; border-left:5px solid #a67c21; border-radius:9px; background:#fff6df; color:#604816; padding:12px 13px; font-size:13px; line-height:1.55; }
.screening-note strong { font-size:14px; font-weight:800; }
.screening-note.candidate { border-left-color:#b9382c; background:#fff0ed; color:#79291f; }
.screening-note.review { border-left-color:#a67c21; background:#fff6df; color:#604816; }
.screening-note.pending { border-left-color:#2f6f9f; background:#eef7ff; color:#244f6e; }
.screening-note.not-detected { border-left-color:#9b7625; }
.web-footer { padding:24px 0 0; color:var(--muted); text-align:center; font-size:11px; }
.sidebar-footnote { margin:0; padding:0 10px; color:var(--muted); font-size:10px; line-height:1.6; }
#status { line-height:1.6; }
@media(max-width:1000px) { .sidebar { width:78px; padding:22px 12px; } .sidebar .brand { justify-content:center; } .sidebar .brand>span:last-child,.nav-label,.nav-item:not(.active),.local-tag span,.sidebar-footnote { display:none; } .app-shell { margin-left:78px; } .web-main { padding:24px; } .web-grid { grid-template-columns:1fr; } }
@media(max-width:620px) { .sidebar { display:none; } .app-shell { margin-left:0; } .topbar { padding:12px 16px; } .private-note { display:none; } .web-main { padding:18px 14px 30px; } .web-heading { margin-top:6px; } .heading-paw { display:none; } .source-panel,.preview-panel,.result-panel { padding:15px; } .preview-stage { min-height:220px; } .dog-result-top { align-items:flex-start; flex-direction:column; } }
@media(max-width:620px) { .action-row .primary-button { flex:1 1 100%; } .action-row .secondary-button { flex:1 1 140px; } .dog-metrics { grid-template-columns:1fr; } .dog-metric:last-child:nth-child(odd) { grid-column:auto; } }

/* ——— Pet Park: quiet surfaces, consistent controls and readable results ——— */
:root {
  --paper: #f4f2eb;
  --white: #ffffff;
  --ink: #252b32;
  --muted: #68717a;
  --green: #1f4d3a;
  --green-2: #2e6a50;
  --light: #e9f1e8;
  --line: #e3e7dd;
  --orange: #c28a58;
  --radius: 20px;
}
body.web-app {
  --paper: #f7f8f5;
  --ink: #2b3430;
  --muted: #6b746f;
  --green: #526e5b;
  --light: #edf2ed;
  --line: #dfe5de;
  --surface-soft: #f5f7f3;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}
.web-app .sidebar {
  width: 216px;
  padding: 32px 16px 24px;
  background: #edf2ec;
  border-right: 1px solid var(--line);
  color: #33413a;
}
.web-app .brand {
  color: #33483b;
  font-size: 23px;
  letter-spacing: -1px;
}
.web-app .brand-mark {
  width: 36px;
  height: 38px;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  transform: none;
}
.web-app .brand-live,
.web-app .brand-live i {
  color: var(--muted);
}
.web-app .brand-live i {
  background: #6b8a5e;
}
.web-app .nav-label {
  margin: 48px 14px 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
}
.web-app .nav-item {
  gap: 11px;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}
.web-app .nav-item:hover {
  background: #e5ece1;
  color: var(--ink);
}
.web-app .nav-item.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 3px 0 var(--green), 0 1px 3px rgba(39, 56, 44, 0.04);
}
.web-app .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: #748278;
}
.web-app .sidebar-admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
}
.web-app .sidebar-admin-link:hover {
  background: #e5ece1;
  color: var(--ink);
}
.web-app .local-tag {
  border-top-color: var(--line);
  padding: 16px 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.web-app .local-tag i {
  background: #6b8a5e;
}
.web-app .sidebar-footnote {
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.web-app .app-shell {
  margin-left: 216px;
}
.web-app .web-main {
  max-width: 1440px;
  padding: 38px 36px 36px;
}
.web-app .web-heading {
  align-items: center;
  margin: 0 0 30px;
}
.web-app .heading-paw {
  flex: 0 0 auto;
  font-size: 48px;
  line-height: 1;
  opacity: 0.8;
}
.web-app .eyebrow {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 2px;
}
.web-app .eyebrow > span {
  width: 6px;
  height: 6px;
  background: #78917b;
}
.web-app h1 {
  margin: 12px 0 10px;
  color: var(--ink);
  font-size: clamp(27px, 2.7vw, 34px);
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.25;
}
.web-app .hero-subtitle {
  max-width: 640px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.web-app .web-grid {
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.6fr);
  gap: 20px;
  align-items: stretch;
}
.web-app .panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(35, 48, 39, 0.025);
}
.web-app .source-panel,
.web-app .preview-panel,
.web-app .result-panel {
  padding: 22px;
}
.web-app .panel-heading {
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf0eb;
}
.web-app .panel-heading > div {
  gap: 10px;
}
.web-app h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.35px;
}
.web-app .section-number {
  display: inline-block;
  color: #859188;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.web-app .subtle {
  color: var(--muted);
  font-size: 12px;
}
.web-app .source-tabs {
  gap: 5px;
  margin: 0 0 16px;
  padding: 5px;
  border-radius: 12px;
  background: #f0f2f0;
}
.web-app .source-tab {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.web-app .source-tab.active {
  background: #ffffff;
  color: #303935;
  box-shadow: 0 2px 7px rgba(35, 64, 46, 0.08);
  font-weight: 650;
}
.web-app .dropzone {
  min-height: 176px;
  border: 1px dashed #c7d2c5;
  border-radius: 10px;
  background: #fafbf8;
}
.web-app .demo-picker { margin: 0 0 18px; }
.web-app .demo-picker label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 650; }
.web-app .demo-picker select { width: 100%; padding: 10px 12px; border: 1px solid #c7d2c5; border-radius: 8px; background: #fff; color: #33413a; font: inherit; font-size: 13px; }
.web-app .demo-picker p { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.web-app .demo-picker a { color: #466b4e; text-decoration: underline; }
.web-app #demo-credit:empty { display: none; }
.web-app .dropzone:hover,
.web-app .dropzone.dragging {
  border-color: #5e8967;
  background: #f0f6eb;
}
.web-app .upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: transparent;
  color: #718673;
}
.web-app .dropzone strong {
  margin-top: 10px;
  color: #33413a;
  font-size: 14px;
}
.web-app .dropzone > span:not(.upload-icon) {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}
.web-app .dropzone small {
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}
.web-app .camera-controls {
  padding: 14px;
  border: 1px solid #e5ece0;
  border-radius: 14px;
  background: var(--surface-soft);
}
.web-app .camera-controls p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.web-app .selected-name {
  min-height: 18px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}
.web-app .action-row {
  gap: 9px;
}
.web-app .primary-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: #303935;
  color: #ffffff;
  box-shadow: none;
  font-weight: 600;
}
.web-app .primary-button:hover:not(:disabled) {
  background: #202823;
}
.web-app .secondary-button {
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #454d48;
  font-size: 13px;
}
.web-app .secondary-button:hover:not(:disabled) {
  border-color: #bfc6c1;
  background: #f5f6f5;
}
.web-app .text-button { color: #454d48; }
.web-app .status-line {
  margin-top: 14px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}
.web-app .privacy-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.web-app .preview-stage {
  flex: 1;
  min-height: 294px;
  border: 1px solid #e5eae2;
  border-radius: 10px;
  background: #f2f5ef;
  box-shadow: none;
}
.web-app #preview-placeholder span {
  color: #8b9c8c;
  font-size: 52px;
  filter: none;
}
.web-app #preview-placeholder p {
  color: var(--muted);
  font-size: 12px;
}
.web-app .preview-footer {
  align-items: center;
  margin-top: 12px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
}
.web-app .preview-hint {
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.web-app .result-panel {
  margin-top: 20px;
}
.web-app .count-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: #edf2ed;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}
.web-app .web-results {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 410px), 1fr));
  gap: 14px;
}
.web-app .web-empty {
  min-height: 124px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.web-app .web-empty span {
  display: none;
}
.web-app .web-empty h3 {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.web-app .web-empty p {
  color: var(--muted);
  font-size: 13px;
}
.web-app .dog-result-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}
.web-app .dog-result-card:hover {
  border-color: #cbd6ca;
  box-shadow: none;
}
.web-app .dog-result-top {
  align-items: center;
  margin-bottom: 13px;
  padding-bottom: 12px;
}
.web-app .result-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.web-app .species-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #e9f1e6;
  color: #2c6046;
  font-size: 12px;
  font-weight: 700;
}
.web-app .species-mark.cat {
  background: #f6ece2;
  color: #8a5b39;
}
.web-app .dog-result-top h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}
.web-app .preview-badge {
  padding: 4px 9px;
  background: #fff2df;
  color: #805d2f;
  font-size: 12px;
}
.web-app .screening-note {
  gap: 5px;
  margin-bottom: 13px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 12px;
}
.web-app .screening-note strong {
  font-size: 13px;
  font-weight: 700;
}
.web-app .screening-note.not-detected {
  border-left-color: #8baa7d;
  background: #f2f7ee;
  color: #4f6954;
}
.web-app .dog-metrics {
  gap: 9px;
}
.web-app .dog-metric {
  min-height: 70px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
}
.web-app .dog-metric span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.3px;
}
.web-app .dog-metric strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.web-app .dog-metric:first-child {
  background: var(--surface-soft);
}
.web-app .dog-metric:first-child strong {
  color: var(--ink);
  font-size: 13px;
}
.web-app .breed-candidate-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border-color: var(--line);
  background: #ffffff;
}
.web-app .breed-candidate-panel > strong { font-size: 13px; }
.web-app .breed-candidate-panel li { font-size: 13px; }
.web-app .behavior-card {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff;
}
.web-app .behavior-card h4 {
  margin-bottom: 10px;
  color: #33413a;
  font-size: 14px;
  font-weight: 650;
}
.web-app .behavior-movement {
  padding: 9px 10px;
  border-left-color: #83a587;
  border-radius: 8px;
  background: var(--surface-soft);
}
.web-app .behavior-cue {
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
}
.web-app .behavior-cue span {
  font-size: 12px;
}
.web-app .behavior-cue strong {
  color: var(--ink);
  font-size: 13px;
}
.web-app .behavior-tendency {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 3px solid #83a587;
  border-radius: 0 8px 8px 0;
  background: var(--surface-soft);
}
.web-app .behavior-tendency p {
  color: var(--muted);
  font-size: 12px;
}
.web-app .cat-result-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.web-app .web-footer {
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.web-app .web-footer p {
  max-width: 720px;
  margin: 0 auto 6px;
  line-height: 1.7;
}
.web-app .web-footer span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2px;
}
@media (max-width: 1180px) {
  .web-app .sidebar { width: 200px; padding-left: 14px; padding-right: 14px; }
  .web-app .app-shell { margin-left: 200px; }
  .web-app .web-main { padding: 28px 26px 38px; }
  .web-app .web-grid { grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.4fr); }
}
@media (max-width: 1000px) {
  .web-app .sidebar { width: 78px; padding: 22px 11px; }
  .web-app .sidebar .brand { justify-content: center; }
  .web-app .brand > span:last-child,
  .web-app .nav-label,
  .web-app .sidebar-admin-link,
  .web-app .local-tag span,
  .web-app .sidebar-footnote { display: none; }
  .web-app .nav-item { justify-content: center; padding: 13px 0; font-size: 0; }
  .web-app .nav-item .nav-icon { font-size: 16px; }
  .web-app .app-shell { margin-left: 78px; }
  .web-app .web-grid { grid-template-columns: 1fr; }
  .web-app .web-heading { align-items: center; }
}
@media (max-width: 700px) {
  .web-app .sidebar { display: none; }
  .web-app .app-shell { margin-left: 0; }
  .web-app .web-main { padding: 22px 14px 32px; }
  .web-app .web-heading { margin-bottom: 20px; }
  .web-app .heading-paw { display: none; }
  .web-app .hero-subtitle { font-size: 13px; }
  .web-app .source-panel,
  .web-app .preview-panel,
  .web-app .result-panel { padding: 16px; border-radius: 12px; }
  .web-app .web-grid { gap: 14px; }
  .web-app .preview-stage { min-height: 220px; }
  .web-app .dog-result-top { align-items: flex-start; }
  .web-app .dog-metrics { grid-template-columns: 1fr; }
  .web-app .dog-metric:last-child:nth-child(odd) { grid-column: auto; }
  .web-app .action-row .primary-button { flex: 1 1 100%; }
  .web-app .web-footer { text-align: left; padding-left: 4px; }
}

/* Supporting text and evidence share the same reading scale. */
.web-app .breed-candidate-panel li small,
.web-app .breed-candidate-panel > small,
.web-app .behavior-movement span,
.web-app .behavior-signals,
.web-app .behavior-badge,
.web-app .behavior-tendency strong,
.web-app .behavior-tendency p {
  font-size: 12px;
  line-height: 1.7;
}
.web-app .breed-candidate-panel > small,
.web-app .behavior-signals p { color: var(--muted); }
.web-app .breed-candidate-panel li {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  overflow-wrap: anywhere;
}
.web-app .breed-candidate-panel li small { grid-column: 1 / -1; }
.web-app .dog-result-card { line-height: 1.65; }
.web-app .primary-button:disabled {
  background: #edf0ec;
  color: var(--muted);
  box-shadow: none;
  opacity: 1;
}
.web-app .preview-panel { display: flex; flex-direction: column; }
.web-app .preview-placeholder-title {
  display: block;
  margin-top: 16px;
  color: #33413a;
  font-size: 17px;
  font-weight: 600;
}
.web-app #preview-placeholder p { line-height: 1.7; }
@media (max-width: 700px) {
  .web-app .breed-candidate-panel li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}

.web-app .source-navigation { display: grid; gap: 6px; }
.web-app .source-nav {
  display: flex;
  width: 100%;
  min-height: 46px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
}
.web-app .source-nav.active .nav-icon { color: var(--green); }
.web-app .source-nav:hover:not(.active) { background: #e5ece1; }
@media (min-width: 701px) {
  .web-app .source-tabs { display: none; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .web-app .sidebar .source-nav { display: flex; }
  .web-app .source-nav .nav-text { display: none; }
}

.breed-model-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: #53645a;
  font-size: 12px;
}
.breed-model-control select {
  min-width: 190px;
  border: 1px solid #d8e1db;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  color: #20392d;
  font: inherit;
}
.breed-model-comparison {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dce8df;
  border-radius: 12px;
  background: #f7faf7;
  color: #395147;
  font-size: 12px;
  line-height: 1.6;
}
.breed-model-comparison p { margin: 5px 0; }
.breed-model-comparison small { display: block; margin-top: 7px; color: #738078; }
/* Keep the optional comparison selector hidden until the candidate model is active. */
.breed-model-control[hidden] { display: none !important; }
#breed-model-control,
.breed-model-comparison {
  display: none !important;
}

/* Icons remain unboxed; sage identifies selection and keyboard focus. */
.web-app .brand-mark { font-size: 28px; }
.web-app .nav-icon { font-size: 16px; line-height: 1; }
.web-app .source-tab { display: flex; align-items: center; justify-content: center; gap: 7px; }
.web-app .source-tab > span { font-size: 16px; line-height: 1; }
.web-app .upload-icon svg { width: 28px; height: 28px; }
.web-app .preview-placeholder-icon svg { width: 44px; height: 44px; stroke-width: 1.2; }
.web-app :is(button, a, input, select):focus-visible,
.web-app .dropzone:focus-within { outline: 3px solid #8da38e; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .web-app *, .web-app *::before, .web-app *::after { scroll-behavior: auto; transition: none; }
}

/* Candidate scores share a fixed 0–100% scale. */
.web-app .breed-candidate-panel ol { gap: 14px; padding: 0; list-style: none; }
.web-app .breed-candidate-panel li { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
.web-app .breed-score-value { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.breed-score-bar { grid-column: 1 / -1; height: 8px; overflow: hidden; border-radius: 3px; background: #e5ebe5; }
.breed-score-bar > span { display: block; height: 100%; border-radius: inherit; background: #388b5a; }

/* Results retain all content; inner sections use spacing and rules instead of nested cards. */
.main-app #results .screening-note {
  padding: 4px 0 4px 12px;
  border-radius: 0;
  background: transparent;
}
.main-app #results .dog-metrics { gap: 12px 20px; margin: 18px 0; }
.main-app #results .dog-metric,
.main-app #results .dog-metric:first-child {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.main-app #results .breed-candidate-panel,
.main-app #results .behavior-card {
  margin-top: 20px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.main-app #results .breed-candidate-panel > strong { margin-bottom: 12px; }
.main-app #results .behavior-card h4 { margin: 0 0 14px; }
.main-app #results .behavior-movement,
.main-app #results .behavior-cue,
.main-app #results .behavior-tendency {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.main-app #results .behavior-movement { margin-bottom: 14px; }
.main-app #results .behavior-cues-grid { gap: 14px 20px; }
.main-app #results .behavior-signals,
.main-app #results .behavior-tendency { margin-top: 18px; }
.main-app #results .behavior-badges { gap: 8px 16px; }
.main-app #results .behavior-badge { padding: 0; border-radius: 0; background: transparent; }
.main-app #results .cat-result-note { margin-top: 18px; line-height: 1.7; }

.main-app #results .dog-metrics {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .65fr) minmax(0, 1.2fr);
  column-gap: 12px;
}
.main-app #results .dog-metric:last-child:nth-child(odd) { grid-column: auto; }
.main-app #results .dog-metric strong { overflow-wrap: anywhere; }
.main-app #results .cat-result-card .dog-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.main-app #results .species-mark { width: 26px; height: 30px; border-radius: 0; background: transparent; font-size: 22px; }

.main-app #results .dog-metric { justify-content: flex-start; gap: 6px; }
