:root {
  color-scheme: light;
  --ink: #392d49;
  --muted: #786e81;
  --purple: #70519a;
  --purple-dark: #583a80;
  --paper: #f7f4ee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #9d77c4; outline-offset: 5px; }
.site-header { max-width: 1160px; margin: auto; padding: 27px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: -.4px; }
.brand-icon { display: grid; place-items: center; width: 37px; height: 37px; background: #e9e0f1; border-radius: 12px; font-size: 19px; }
.local-badge { font-size: 12px; color: #65725b; display: flex; align-items: center; gap: 7px; }
.local-badge span { width: 6px; height: 6px; border-radius: 50%; background: #839776; }
main { max-width: 1024px; padding: 24px 32px 20px; margin: auto; }
.intro { text-align: center; margin-bottom: 36px; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 2.2px; color: var(--purple); margin: 0 0 10px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 7vw, 76px); line-height: 1.12; font-weight: 500; letter-spacing: -3px; margin: 0 0 17px; }
.or { color: #a28ab7; font-style: italic; }
.question { color: var(--purple); }
.subtitle { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }
.app-card { display: grid; grid-template-columns: 1.08fr 1fr; background: #fffefa; border: 1px solid #e7e0d9; border-radius: 24px; box-shadow: 0 12px 40px #49365308; overflow: hidden; }
.upload-panel { padding: 28px; border-right: 1px solid #ece6e0; }
.section-label { display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: var(--muted); margin-bottom: 20px; }
.step { border: 1px solid #ddd4e3; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 10px; letter-spacing: 0; color: var(--purple); }
.drop-zone { position: relative; background: #f4f0f8; border: 1.5px dashed #cfc0de; border-radius: 16px; min-height: 282px; height: 282px; display: grid; place-items: center; overflow: hidden; transition: background .2s, border-color .2s; }
.drop-zone.dragging { background: #e9def6; border-color: var(--purple); }
.placeholder { text-align: center; padding: 12px; }
.pet-illustration { width: 235px; max-width: 100%; height: 151px; }
.drop-title { margin: 7px 0 3px; font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); margin: 0; font-size: 12px; }
#preview { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.photo-badge { position: absolute; bottom: 10px; left: 10px; padding: 5px 10px; border-radius: 20px; font-size: 10px; color: var(--ink); background: #fffefaeF; box-shadow: 0 1px 8px #0001; }
.file-info { display: flex; justify-content: space-between; gap: 16px; font-size: 11px; color: var(--muted); margin: 11px 2px 20px; }
#file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info > :last-child { flex-shrink: 0; }
.actions { display: flex; gap: 10px; }
.button { border-radius: 10px; border: 1px solid transparent; padding: 12px 14px; font-size: 13px; font-weight: 650; transition: background .2s, transform .2s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-secondary { background: #fffefa; color: var(--ink); border-color: #ddd4e3; flex: 1; }
.button-secondary:hover { background: #f4f0f8; }
.button-primary { background: var(--purple); color: white; flex: 1.15; display: flex; justify-content: center; gap: 14px; }
.button-primary:hover:not(:disabled) { background: var(--purple-dark); }
.button-primary:disabled { background: #e6dfec; color: #8d7a9e; cursor: not-allowed; }
.error-message { color: #9e344b; background: #fff0f1; border-radius: 8px; padding: 10px 12px; font-size: 12px; margin: 14px 0 0; }
.result-panel { padding: 28px; display: flex; flex-direction: column; }
.result-region { display: grid; align-items: center; flex: 1; min-height: 290px; text-align: center; }
.result-paw { margin: 0 auto 23px; height: 64px; width: 64px; border-radius: 50%; background: #f3edf6; display: grid; place-items: center; font-size: 27px; transform: rotate(-12deg); }
h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 29px; line-height: 1.22; letter-spacing: -.6px; margin: 0 0 17px; }
#status-message { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }
.little-note { border-top: 1px solid #ece6e0; margin-top: 22px; padding-top: 17px; color: var(--muted); font-size: 11px; text-align: center; }
.little-note span { font-size: 17px; vertical-align: -1px; color: var(--purple); margin-right: 3px; }
.result-emoji { font-size: 49px; display: block; margin-bottom: 9px; }
.prediction-result .eyebrow { font-size: 9px; margin-bottom: 5px; }
#result-label { font-size: 43px; color: var(--purple-dark); margin-bottom: 5px; }
.result-description { margin: 0 0 25px; color: var(--muted); font-size: 13px; }
.confidence-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.confidence-row strong { color: var(--purple-dark); }
.confidence-meter { height: 9px; background: #eee7f1; border-radius: 20px; overflow: hidden; }
.confidence-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: #a58abb; transition: width .4s ease; }
.confidence-note { color: var(--muted); font-size: 10px; margin: 10px 0 0; }
.privacy-note { text-align: center; color: var(--muted); font-size: 12px; margin: 23px 0 0; }
.privacy-note span { color: var(--purple); margin-right: 4px; }
footer { text-align: center; font-size: 10px; letter-spacing: .4px; color: #918796; margin-top: 36px; }
.busy .result-paw { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(8deg) translateY(-5px); } }
@media (max-width: 700px) {
  .site-header { padding: 20px; }
  .local-badge { font-size: 10px; }
  main { padding: 20px 16px; }
  .intro { margin-bottom: 28px; }
  .app-card { grid-template-columns: 1fr; }
  .upload-panel { border-right: 0; border-bottom: 1px solid #ece6e0; }
  .upload-panel, .result-panel { padding: 22px; }
  .result-region { min-height: 255px; }
  .subtitle { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
