/* Damion's Farm v6 additions */
.welcome-name { font-weight: 850; }
.user-summary { color: inherit; }
.user-avatar { overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.large-avatar { width: 92px; height: 92px; flex-basis: 92px; font-size: 2rem; }
.profile-photo-preview { margin-bottom: 24px; }
.animal-photo img { object-fit: cover; object-position: 50% 50%; transform: none; }
.animal-card:hover .animal-photo img { transform: none; }
.animal-profile-header { display: grid; align-items: start; gap: 22px; }
.animal-profile-header .animal-detail-photo { display: flex; width: 100%; max-width: 960px; margin: 0; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #dedbd0; border-radius: 16px; background: #ebe8df; box-shadow: 0 12px 32px rgba(35, 39, 35, .10); }
.animal-profile-header .animal-detail-photo img { width: auto; max-width: 100%; height: auto; max-height: 620px; display: block; object-fit: contain; object-position: center; }
.animal-profile-header > .button { width: 100%; justify-content: center; }
.messages { margin-bottom: 22px; }
.message { padding: 12px 15px; border: 1px solid #d8bf83; border-radius: 9px; background: #fbf6e9; color: #725624; font-weight: 700; }
.species-overview { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: stretch; }
.species-overview .species-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.species-card-icon.animal-figure { width: 48px; height: 48px; border: 0; background: transparent; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 2.35rem; line-height: 1; filter: grayscale(1) sepia(.7) saturate(1.4); transform: scaleX(-1); }
.species-card:hover .animal-figure { filter: grayscale(.35) sepia(.5) saturate(1.25); transform: scaleX(-1) translateY(-2px); }
.chart-panel { display: flex; min-height: 164px; padding: 18px; align-items: center; justify-content: space-between; flex-direction: column; }
.chart-panel h2 { margin: 0; }
.donut { width: 116px; height: 116px; display: grid; margin: 12px auto; place-items: center; border-radius: 50%; background: var(--donut); position: relative; }
.donut::after { position: absolute; width: 68px; height: 68px; border-radius: 50%; background: #fff; content: ""; }
.donut span { position: relative; z-index: 1; display: grid; text-align: center; }
.donut strong { color: #20231f; font-size: 1.35rem; line-height: 1; }
.donut small { margin-top: 3px; color: #7b8079; font-size: .62rem; }
.chart-legend { width: 100%; display: grid; gap: 5px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; color: #7b8079; font-size: .64rem; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; }
.chart-legend strong { margin-left: auto; color: #333832; }
.site-form { max-width: 900px; }
.compact-form { max-width: 600px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-field { display: grid; gap: 7px; align-content: start; }
.form-field-wide { grid-column: 1 / -1; }
.site-form label { color: #333832; font-size: .78rem; font-weight: 800; }
.site-form input[type="text"], .site-form input[type="date"], .site-form input[type="file"], .site-form select, .site-form textarea { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #d8d5cc; border-radius: 8px; background: #fff; color: #20231f; font: inherit; }
.site-form textarea { resize: vertical; }
.site-form input:focus, .site-form select:focus, .site-form textarea:focus { border-color: #d3a94e; outline: 3px solid rgba(211,169,78,.15); }
.site-form ul { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; }
.site-form ul label { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.field-error, .errorlist { color: #8b2722; font-size: .76rem; }
.form-actions { display: flex; margin-top: 28px; gap: 10px; }
@media (max-width: 1180px) { .species-overview { grid-template-columns: 1fr; } .chart-panel { min-height: auto; } .chart-legend { max-width: 300px; } }
@media (max-width: 760px) { .species-overview .species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid { grid-template-columns: 1fr; } .form-field-wide { grid-column: auto; } }
@media (max-width: 430px) { .form-actions { flex-direction: column; } .form-actions .button { width: 100%; } .animal-profile-header .animal-detail-photo { border-radius: 12px; } .animal-profile-header .animal-detail-photo img { max-height: 460px; } }

/* v14 per-animal card photo positioning */
.card-photo-positioner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; margin-top: 26px; padding: 22px; align-items: center; gap: 28px; border: 1px solid #dedbd0; border-radius: 14px; background: #f7f5ef; }
.card-photo-positioner[hidden] { display: none; }
.card-photo-positioner h2 { margin: 3px 0 7px; font-size: 1.15rem; }
.card-photo-positioner p { margin: 0; color: #6e756f; }
.card-photo-controls { display: grid; margin-top: 20px; gap: 7px; }
.card-photo-controls label { display: flex; margin-top: 8px; justify-content: space-between; }
.card-photo-controls output { color: #8a651d; }
.card-photo-controls input[type="range"] { width: 100%; accent-color: #9d7625; }
.preview-card { width: 100%; max-width: 300px; justify-self: end; pointer-events: none; }
.preview-card .animal-photo { height: 220px; }
.animal-photo { position: relative; }
.animal-photo img[data-card-photo] { position: absolute; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: none !important; }
.preview-card .animal-photo img { padding: 0; }
@media (max-width: 760px) { .card-photo-positioner { grid-template-columns: 1fr; } .preview-card { max-width: 100%; justify-self: stretch; } }

/* Dashboard drill-downs and animal history */
.summary-card { text-decoration: none; }
.summary-card.active { outline: 3px solid rgba(177, 133, 43, .35); outline-offset: 2px; }
.dashboard-breakdown { margin: 20px 0 28px; scroll-margin-top: 22px; }
.breakdown-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.breakdown-grid a { display: flex; padding: 14px 16px; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e1ddd2; border-radius: 10px; background: #faf8f2; color: #292d2b; text-decoration: none; }
.breakdown-grid a:hover { border-color: #b1852b; background: #f4efdf; }
.breakdown-grid strong { color: #8a651d; font-size: 1.15rem; }
.profile-actions { display: flex; width: 100%; gap: 10px; }
.profile-actions .button { flex: 1; }
.photo-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.managed-photo { margin: 0; overflow: hidden; border: 1px solid #dedbd0; border-radius: 12px; background: #f6f4ed; }
.managed-photo img { width: 100%; height: 180px; display: block; object-fit: cover; }
.managed-photo figcaption { display: grid; gap: 10px; padding: 12px; }
.managed-photo figcaption span { font-size: .9rem; color: #666c67; }
.button.danger { border-color: #a23b32; background: #a23b32; color: #fff; }
.button.danger:hover { background: #842f28; }
.button.small { min-height: 36px; padding: 7px 12px; font-size: .88rem; }
.history-row { align-items: flex-start; }
.parent-animal-link { color: #7d5c1d; font-weight: 800; text-decoration: none; }
.parent-animal-link:hover { color: #315f4b; text-decoration: underline; }
.offspring-detail { align-items: flex-start !important; }
.offspring-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; }
@media (max-width: 760px) { .breakdown-grid { grid-template-columns: 1fr 1fr; } .profile-actions { flex-direction: column; } }
@media (max-width: 430px) { .breakdown-grid { grid-template-columns: 1fr; } }

/* v7 species and dashboard customization */
.section-actions { display: flex; align-items: center; gap: 18px; }
.dashboard-species-form fieldset { margin: 0 0 28px; padding: 0; border: 0; }
.dashboard-species-form legend { margin-bottom: 12px; color: #333832; font-size: .82rem; font-weight: 850; }
.dashboard-size-options ul { display: flex; gap: 12px; }
.dashboard-size-options label { min-width: 110px; padding: 12px 16px; border: 1px solid #d8d5cc; border-radius: 9px; background: #fff; cursor: pointer; }
.species-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.species-pick { display: flex; min-height: 64px; padding: 10px 12px; align-items: center; gap: 9px; border: 1px solid #d8d5cc; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.species-pick:hover { border-color: #d3a94e; transform: translateY(-1px); box-shadow: 0 5px 15px rgba(43,45,40,.07); }
.species-pick:has(input:checked) { border-color: #d3a94e; background: #fbf6e9; box-shadow: inset 0 0 0 1px #d3a94e; }
.species-pick input { accent-color: #9d7625; }
.species-pick-icon { width: 30px; text-align: center; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.65rem; line-height: 1; }
@media (max-width: 950px) { .species-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) { .species-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } .section-actions { gap: 10px; } }
