html{-webkit-tap-highlight-color:transparent}
:root{--green:#2c8052;--mint:#e0efe3;--paper:#f7f4ee;--ink:#211b18;--muted:#8b827a;--line:#e9e1da;--gold:#df641d}html{background:var(--paper)}body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:calc(15px + 2pt);line-height:1.45;color:var(--ink);background:var(--paper);padding-bottom:0}h1,h2,h3,.number,.stat strong,.chart-kpis b,.donut b,.curve-total{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-weight:750;letter-spacing:-.6px}h1{font-size:calc(28px + 2pt)}h2{font-size:calc(20px + 2pt)}header{height:68px;padding:14px 20px;background:#50362e;color:white;border:0;position:relative;z-index:4}.brand{gap:10px}.brand b{font:700 calc(17px + 2pt) system-ui;color:#fff}.brand small{font-size:calc(10px + 2pt);letter-spacing:0;color:#ddc8bb}.brand .mark{height:36px;width:36px;border-radius:13px;font-size:calc(20px + 2pt);background:#ffffff25;color:white}.cloud-pill{font:600 calc(11px + 2pt) system-ui;padding:8px 12px;min-height:30px;max-width:145px;background:#fff;color:#27714b;border:0;white-space:nowrap}#prototypeScene{height:140px;position:relative;background:#50362e;color:white;overflow:hidden;margin-top:-1px}.scene-label{position:relative;z-index:2;padding:9px 22px}.scene-label small{font-size:calc(12px + 2pt);text-transform:capitalize;color:#f1dfd2}.scene-label h1{margin:2px 0;font-size:calc(30px + 2pt);line-height:1.2;color:white}.scene-sun{position:absolute;right:44px;bottom:42px;width:66px;height:66px;background:#ed7937;border-radius:50%;z-index:0}.scene-shape{position:absolute;pointer-events:none}.shape-one{bottom:2px;left:-8%;height:94px;width:118%;background:#764334;clip-path:polygon(0 64%,15% 20%,30% 65%,48% 0,68% 72%,92% 27%,100% 58%,100% 100%,0 100%);z-index:1}.shape-two{left:-15%;bottom:-47px;width:130%;height:90px;border-radius:50%;background:#b85c3c;z-index:1}body[data-view=animals] header,body[data-view=animals] #prototypeScene{background:#2b8051}body[data-view=animals] .shape-one{background:#ffffff12}body[data-view=animals] .shape-two{background:#ffffff0d}body[data-view=animals] .scene-sun{background:#ffffff15;width:130px;height:130px;right:-30px;bottom:25px}body:not([data-view=home]) #prototypeScene{height:100px}main#app{position:relative;z-index:2;max-width:980px;margin:-20px auto 0;border-radius:28px 28px 0 0;background:var(--paper);min-height:calc(100dvh - 188px);padding:19px 18px calc(var(--nav-height) + 105px);animation:prototypeSheet .3s ease-out}main>.row:first-child>h1,main>h1:first-child,body[data-view=animals] main>.row:first-of-type>h1{display:none}main>.row:first-child{justify-content:flex-end}body[data-view=home] main>.hero{display:none}.proto-period .periods{margin:0 0 14px;display:flex;align-items:center;justify-content:space-between;gap:10px}.proto-period .periods>label{display:none}.proto-period .periods select{width:auto;max-width:155px;background:white;border:1px solid var(--line);border-radius:30px;font-size:calc(12px + 2pt);padding:10px 12px;margin:0;min-height:38px}.proto-period .periods>p{font-size:calc(10px + 2pt);text-align:right;margin:0;max-width:150px;line-height:1.5}.proto-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.proto-metric{border:0;border-radius:21px;background:white;text-align:left;padding:16px 15px;min-height:111px;position:relative;color:var(--ink);font:inherit}.proto-metric>span{display:block;font-size:calc(12px + 2pt);min-height:32px;line-height:1.35;color:#7f756d}.proto-metric>strong{font-size:calc(30px + 2pt);font-weight:750;letter-spacing:-1.1px;display:block;line-height:1.1;margin-top:8px}.proto-metric strong small{font-weight:400;font-size:calc(12px + 2pt);letter-spacing:0;margin-left:5px}.proto-metric.featured{background:#2b8051;color:#fff}.proto-metric.featured>span{color:#d9f0df}.proto-metric.featured strong small{color:#fff}.proto-metric.peach{background:#fce0cd}.proto-metric.peach>span{color:#a34e21}.proto-metric i{position:absolute;bottom:14px;right:14px}.proto-metric i svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.proto-animal-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.proto-animal-actions button{display:flex;align-items:center;gap:10px;justify-content:center;background:#ddefdf;color:#225b3c;min-height:73px;border:0;border-radius:21px;padding:15px 10px;cursor:pointer;font-size:calc(13px + 2pt)}.proto-animal-actions button+button{background:#fbe2cf;color:#9b481d}.proto-animal-actions b{font-weight:600;max-width:74px;text-align:left;line-height:1.35}.proto-animal-actions svg,.proto-upcoming svg,.proto-chart-entry svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 25px}.proto-upcoming{width:100%;border:0;border-radius:20px;min-height:57px;display:flex;align-items:center;gap:12px;padding:15px 18px;background:#e3651d;color:white;box-shadow:0 5px 14px #dd681d26;text-align:left;cursor:pointer;margin:4px 0 12px;font-size:calc(15px + 2pt);font-weight:650}.proto-upcoming span{flex:1}.proto-upcoming span b{display:inline-grid;place-items:center;background:#ffffff24;min-width:25px;height:25px;padding:0 6px;font-size:calc(12px + 2pt);margin-left:7px;border-radius:8px}.proto-upcoming>svg:last-child{width:17px;height:17px;flex-basis:17px}.proto-chart-entry{display:flex;align-items:center;gap:12px;width:100%;border:0;border-radius:20px;background:white;text-align:left;padding:14px;min-height:72px;color:var(--ink);cursor:pointer}.proto-chart-entry>span:nth-child(2){flex:1;min-width:0}.proto-chart-entry b{font-size:calc(14px + 2pt);display:block}.proto-chart-entry small{font-size:calc(10px + 2pt);display:block;margin-top:4px;color:#8d8279}.proto-chart-symbol{width:39px;height:39px;display:grid;place-items:center;background:#e0f0e2;border-radius:14px;color:#287b4d}.proto-chart-entry>svg{width:18px;height:18px;flex-basis:18px;color:#6a6b5e}.proto-transfers{display:block;margin:8px auto;color:#877466;font-size:calc(12px + 2pt);padding:8px}nav{left:12px;right:12px;bottom:12px;max-width:956px;margin:auto;gap:2px;border:1px solid #ede8e1;border-radius:32px;padding:6px;background:#fff;box-shadow:0 7px 22px #49342714}nav button{width:auto;flex:1;min-height:42px;flex-direction:row;gap:5px;padding:8px 6px;border-radius:24px;color:#76695e}nav button svg{width:21px;height:21px;flex-shrink:0}nav button span{display:none;font-size:calc(11px + 2pt);font-weight:600}nav button.active{flex:1.45;color:#22633f;background:#e2f0e3}nav button.active span{display:block}.floating-search{bottom:calc(var(--nav-height) + 35px)}.primary{background:#2b8051;border-radius:18px;min-height:46px;font-size:calc(14px + 2pt)}.secondary{background:#e3eee3}.card,.visual-card{border:0;border-radius:21px;padding:18px}.animal{border:0;border-radius:21px;padding:14px;gap:12px;min-height:82px;box-shadow:none}.animal .avatar{height:42px;width:36px;background:#fce3d3;color:#d26b34;border-radius:15px;font-size:calc(22px + 2pt)}.animal .meta strong{font-size:calc(16px + 2pt);font-weight:750;margin-bottom:3px}.animal .meta small{display:block;font-size:calc(11px + 2pt);line-height:1.55;color:#998777}.proto-state{font-size:calc(10px + 2pt);padding:6px 9px;background:#e1efe2;color:#2a6744;border-radius:11px;white-space:nowrap;align-self:center}.proto-state.empty{padding:6px 9px;border:0;background:#fde1cb;color:#9b481c}.proto-state.calved{background:#eadbd2;color:#785545}.proto-state.dead,.proto-state.exited{background:#efe8e4;color:#836357}.proto-filter-chips{display:flex;gap:7px;overflow:auto;scrollbar-width:none;margin:0 -2px 11px;padding-bottom:2px}.proto-filter-chips button{flex-shrink:0;border:1px solid #e9e0d7;background:#fff;border-radius:18px;padding:8px 12px;min-height:36px;font-size:calc(11px + 2pt);color:#42352a;cursor:pointer}.proto-filter-chips button.chosen{background:#2c8052;color:#fff;border-color:transparent}.filter-panel{margin:0 0 10px;padding:0;background:transparent}.filter-panel summary{min-height:34px;padding:0 0 5px}.animal-filter-heading #animalCount{font-size:calc(12px + 2pt);color:#8b7869}.filter-trigger{font-size:calc(12px + 2pt);color:#6e655c}.filter-trigger svg{width:14px;height:14px}body[data-view=animals] main>.row{margin:4px 0 7px}body[data-view=animals] main>.row .primary{font-size:calc(11px + 2pt);padding:7px 11px;min-height:32px;background:#fff;color:#2d754d;border:1px solid #dce8dc;border-radius:12px}.bulk-toolbar{margin:0 0 12px}.bulk-toolbar .linkbutton{font-size:calc(12px + 2pt)}.details{font-size:calc(14px + 2pt)}input,select,textarea{font-size:calc(14px + 2pt);padding:12px 13px;border:1px solid #e2dad1;border-radius:15px;background:#fff;min-height:45px}label{font-size:calc(13px + 2pt);margin:16px 0 6px}.animal-input-status{font-size:calc(11px + 2pt);margin:5px 0 10px}.input-valid{color:#28784d}input[aria-invalid=false]:focus{outline:none;border-color:#2b8051;box-shadow:0 0 0 1px #2b8051}.notice{background:#fce3d0;color:#805239;font-size:calc(12px + 2pt);padding:13px;border-radius:15px;line-height:1.55}.tag{background:#ecded4;color:#805642;font-size:calc(11px + 2pt);padding:6px 10px}.event{border-left-color:#dae8d9}.event p{font-size:calc(14px + 2pt)}.event-origin{font-size:calc(11px + 2pt)!important}dialog#modal,dialog.tasks-sheet{position:fixed;top:auto;bottom:0;left:0;right:0;margin:0 auto;width:min(100%,600px);border:0;border-radius:28px 28px 0 0;max-height:88dvh;padding:27px 20px 22px;background:var(--paper);box-shadow:0 -10px 40px #35251b20}dialog#modal::before,dialog.tasks-sheet::before{content:'';position:absolute;width:42px;height:4px;border-radius:3px;background:#d8cec3;left:calc(50% - 21px);top:9px}dialog[open]#modal,dialog[open].tasks-sheet{animation:prototypeSheet .28s cubic-bezier(.2,.7,.3,1)}dialog#modal::backdrop,dialog.tasks-sheet::backdrop{background:#2f211e9c;backdrop-filter:blur(1px)}.dialog-title{align-items:center;margin:7px 0 15px;gap:12px}.dialog-title h2{font-size:calc(22px + 2pt);font-weight:750;letter-spacing:-.7px;margin:0;line-height:1.25}.dialog-title>button,.tasks-sheet #tasksClose{width:38px;height:38px;min-height:38px;flex-shrink:0;background:#fff;border:1px solid #e7dfd7;border-radius:50%;font-size:calc(25px + 2pt);display:grid;place-items:center;padding:0;text-decoration:none}.full{min-height:49px;margin-top:22px;box-shadow:0 4px 11px #2b80511f;border-radius:24px}.proto-destination{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}.proto-destination button{border-radius:15px;border:1px solid #e2dad1;background:white;padding:12px 8px;min-height:45px;color:#352e28;font-size:calc(12px + 2pt);font-weight:600;cursor:pointer}.proto-destination button[aria-checked=true]{border-color:#2b8051;background:#e0efdf;box-shadow:0 0 0 1px #2b8051;color:#246b46}.task-card{border:0;border-radius:20px;padding:15px;gap:12px}.task-title{font-size:calc(16px + 2pt)}.task-animal{font-size:calc(12px + 2pt)}.task-body small{font-size:calc(11px + 2pt)}.tasks-sheet h2{font-size:calc(22px + 2pt)}.task-calendar{border:0;border-radius:18px;background:white}.calendar-day{font-size:calc(14px + 2pt)}.reminder-fields{padding:14px;border-radius:19px;background:#e8eddf;border:0}.reminder-fields summary{font-size:calc(14px + 2pt)}.reminder-toggle{font-size:calc(12px + 2pt)}.calendar-header button{background:#fff!important;color:#377850!important;border-radius:12px}.proto-statistics .dialog-title{margin-bottom:18px}.proto-chart-period{display:flex;align-items:center;justify-content:space-between;gap:12px}.proto-chart-period select{font-size:calc(12px + 2pt);max-width:175px;border-radius:20px;background:white}.proto-chart-period>span{font-size:calc(11px + 2pt);color:#8b7c70}.proto-chart-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.proto-chart-kpis>div{background:#e1eddf;border-radius:18px;padding:13px 11px}.proto-chart-kpis>div:nth-child(2){background:#fbe2ce}.proto-chart-kpis>div:nth-child(3){background:white}.proto-chart-kpis small{font-size:calc(10px + 2pt);color:#7a796c}.proto-chart-kpis b{font-size:calc(29px + 2pt);color:#2f6343;display:block;letter-spacing:-1px;margin-top:3px}.proto-statistics .visual-card{margin:13px 0;padding:17px}.proto-statistics .visual-card h2{font-size:calc(18px + 2pt);letter-spacing:-.5px}.proto-statistics .visual-card>p.subtle,.proto-statistics .birth-curve .eyebrow{display:none}.proto-statistics .donut{width:140px;height:140px;flex-basis:140px;box-shadow:none}.proto-statistics .donut>span{width:102px;height:102px}.proto-statistics .donut b{font-size:calc(30px + 2pt)}.proto-statistics .donut-layout{gap:18px}.proto-statistics .chart-legend{gap:14px;font-size:calc(12px + 2pt)}.proto-statistics .chart-legend>div{font-size:calc(12px + 2pt)}.proto-statistics .birth-curve{background:#fff}.proto-statistics .curve-total{font-size:calc(29px + 2pt);color:#dc702b}.proto-statistics .curve-labels{font-size:calc(10px + 2pt)}.proto-statistics .proto-metric strong{font-size:calc(23px + 2pt)}.proto-activity{display:grid;gap:18px}.proto-activity>div{display:grid;grid-template-columns:85px 1fr 22px;align-items:center;gap:10px;font-size:calc(12px + 2pt)}.proto-activity i{height:10px;border-radius:5px;background:#f1eee8;overflow:hidden}.proto-activity i b{display:block;height:100%;border-radius:5px}.proto-activity strong{text-align:right}.chart-entry{border:0;background:#fff}.section.card h2{font-size:calc(20px + 2pt)}.periods{margin:18px 0}.subtle{font-size:calc(12px + 2pt)}.farm-menu{top:58px;left:16px;width:calc(100% - 32px);padding:18px;border-radius:22px}.farm-menu h3{font-size:calc(17px + 2pt)}.farm-choice{border-radius:14px;font-size:calc(14px + 2pt);padding:13px}.farm-choice small{font-size:calc(11px + 2pt)}#processing{font-size:calc(12px + 2pt)}#toast{font-size:calc(13px + 2pt)}.delete-link{font-size:calc(12px + 2pt)}@keyframes prototypeSheet{from{transform:translateY(32px);opacity:.5}to{transform:translateY(0);opacity:1}}@media(min-width:650px){.proto-metrics{grid-template-columns:1fr 1fr}.scene-label{max-width:944px;margin:auto}#prototypeScene{height:150px}}@media(prefers-reduced-motion:reduce){dialog[open]#modal,dialog[open].tasks-sheet,main#app{animation:none}}
#floatingSearch{--green:#173f35;--muted:#69776e;--line:#dce2d9}
body[data-view="animals"] #app > .row > h1{display:none}

/* Reference proportions, system type and layered controls. */
:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-optical-sizing:auto}
body,button,input,select,textarea{font-family:inherit}
header{height:64px;padding:12px 20px}.brand small{display:none}
#prototypeScene{height:112px}.scene-label h1{font-size:calc(28px + 2pt);letter-spacing:-.025em;line-height:1.1}.scene-label small{font-size:calc(11px + 2pt);letter-spacing:.015em}
main#app{padding:24px 18px 110px}.proto-period{margin-bottom:12px}
.proto-metric{min-height:101px;padding:13px 15px;border-radius:21px}.proto-metric>span{min-height:28px;font-size:calc(12px + 2pt)}.proto-metric>strong{font-size:calc(30px + 2pt);margin-top:5px}
.proto-animal-actions{gap:10px;margin-top:10px}.proto-animal-actions button{min-height:74px;display:flex;flex-direction:column;gap:5px;align-items:flex-start;justify-content:center;padding:12px 16px}.proto-animal-actions b{font-size:calc(13px + 2pt)}.proto-animal-actions button:first-child{box-shadow:0 3px 10px #236a3910}
.proto-upcoming{background:#db5613;color:#fff;margin-top:10px;border-radius:19px;box-shadow:0 5px 14px #c6511c22;min-height:54px}
.proto-chart-entry{margin-top:10px;min-height:65px}.proto-transfers{margin:10px auto 0;font-size:calc(12px + 2pt)}
nav{background:rgba(255,255,255,.88);backdrop-filter:blur(20px) saturate(150%);box-shadow:0 6px 24px #382d211a;border:1px solid #ffffffc4}
button{touch-action:manipulation;transition:transform 90ms ease-out,filter 90ms ease-out}button:active{filter:brightness(.95);transform:scale(.975)}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #2d8053;outline-offset:3px}
dialog[open]#modal,dialog[open].tasks-sheet{animation:none;transition:none;will-change:transform}dialog#modal::before,dialog.tasks-sheet::before{display:none}
.proto-sheet-grab{display:block;width:76px;height:24px;min-height:24px!important;padding:10px 17px!important;margin:-22px auto 8px!important;background:none!important;border:0!important;touch-action:none;cursor:grab;box-shadow:none!important}.proto-sheet-grab:after{content:'';display:block;height:4px;width:42px;background:#cfc6bc;border-radius:4px}.proto-sheet-grab:active{cursor:grabbing;transform:none}
dialog#modal,dialog.tasks-sheet{padding-top:27px;max-height:89dvh}.dialog-title>button,.tasks-sheet #tasksClose{width:44px;height:44px;min-height:44px}
.proto-destination button{min-height:48px}.proto-chart-kpis b{font-variant-numeric:tabular-nums}
@media(prefers-reduced-transparency:reduce){nav{background:#fff;backdrop-filter:none}dialog::backdrop{backdrop-filter:none}}
@media(prefers-contrast:more){nav{background:#fff;border:1px solid #43594a}.proto-metric,.proto-chart-entry{border:1px solid #728174}.proto-metric>span{color:#4f554e}}
@media(prefers-reduced-motion:reduce){button:active{transform:none}dialog{will-change:auto!important}}

/* Motion refinements: stable geometry; only the decorative search surface scales. */
:root{--ease-out:cubic-bezier(.23,1,.32,1);--motion-popover:200ms}
.floating-search,.floating-search.is-open{width:min(520px,calc(100% - 32px));transition:none;pointer-events:none}
.search-glass-bar,.floating-search.is-open .search-glass-bar{position:relative;justify-content:flex-end;background:transparent;border:0;box-shadow:none;padding-left:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.search-glass-bar:before{content:'';position:absolute;inset:0;border-radius:28px;background:rgba(247,251,247,.9);border:1px solid #ffffffe0;box-shadow:0 6px 25px #173f3526;backdrop-filter:blur(20px) saturate(150%);transform-origin:right center;transform:scaleX(.16);opacity:0;transition:transform var(--motion-popover) var(--ease-out),opacity 125ms var(--ease-out);pointer-events:none}
.floating-search.is-open .search-glass-bar:before{transform:scaleX(1);opacity:1}
.search-input-frame{position:relative;z-index:1;opacity:0;transition:opacity 125ms var(--ease-out);pointer-events:auto;padding-left:20px}
.floating-search.is-open .search-input-frame{opacity:1}
#globalSearchToggle{position:relative;z-index:1;pointer-events:auto;background:rgba(247,251,247,.9);border:1px solid #ffffffe0;box-shadow:0 6px 25px #173f3526;backdrop-filter:blur(20px) saturate(150%)}
.floating-search.is-open #globalSearchToggle{background:transparent;border-color:transparent;box-shadow:none;backdrop-filter:none}
.search-results-glass{pointer-events:auto}
#toast{display:block;visibility:hidden;pointer-events:none;opacity:0;transform:translateX(-50%) translateY(4px);transition:opacity 125ms var(--ease-out),transform 125ms var(--ease-out)}
#toast.toast-visible{opacity:1;transform:translateX(-50%) translateY(0);transition-duration:150ms}
.calendar-day{transition:background-color 125ms ease,color 125ms ease}
@media(prefers-reduced-motion:reduce){.search-glass-bar:before{transform:none!important;transition:opacity 125ms var(--ease-out)}#toast,#toast.toast-visible{transform:translateX(-50%);transition:opacity 125ms var(--ease-out)}}
@media(prefers-reduced-transparency:reduce){.search-glass-bar:before,#globalSearchToggle{background:#f7fbf7;backdrop-filter:none}}
/* Imagen elegida por la usuaria; archivo original intacto. */
#prototypeScene{background:#415c3a url('./finca-referencia.png') center 62%/cover no-repeat;height:160px}
#prototypeScene .scene-shape,#prototypeScene .scene-sun{display:none}
#prototypeScene:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,rgba(22,44,29,.72),rgba(22,44,29,.12));pointer-events:none}
#prototypeScene .scene-label{z-index:2;padding-top:22px;max-width:80%}
body:not([data-view=home]) #prototypeScene{background-image:url('./finca-referencia.png');height:112px}
body[data-view=animals] #prototypeScene{background-color:#2b8051}

/* FONT_PLUS_TWO_POINTS: valores explícitos aumentados 2pt, sin doble escalado por herencia. */

/* Paneles flotantes completos: encabezado, contenido y acción independientes. */
dialog#modal,dialog.tasks-sheet{top:auto;bottom:calc(12px + env(safe-area-inset-bottom,0px));left:12px;right:12px;width:calc(100% - 24px);max-width:560px;height:min(86dvh,900px);max-height:calc(var(--sheet-viewport,100dvh) - 24px - env(safe-area-inset-bottom,0px));margin:0 auto;padding:0;border-radius:28px;overflow:hidden;box-sizing:border-box;box-shadow:0 20px 60px #142b2638}
dialog#modal[open],dialog.tasks-sheet[open]{display:flex;flex-direction:column}
#modal #form{display:flex;flex-direction:column;flex:1;min-height:0;max-height:100%;margin:0;overflow:hidden}
#modal .proto-sheet-grab,.tasks-sheet>.proto-sheet-grab{flex:0 0 28px;width:76px;height:28px;min-height:28px!important;margin:0 auto!important;padding:12px 17px!important}
#modal .dialog-title,.tasks-sheet>.row{flex:0 0 auto;min-height:54px;margin:0;padding:0 20px 14px;align-items:center;background:var(--paper);position:relative;z-index:2}
#modal .dialog-title h2,.tasks-sheet>.row h2{margin:0;font-size:calc(22px + 2pt);line-height:1.2;letter-spacing:-.02em}
#modal #fields,.tasks-sheet>.sheet-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior-y:contain;scroll-padding:20px;padding:0 20px 24px;-webkit-overflow-scrolling:touch}
#modal #fields>label:first-child{margin-top:0}#modal #fields textarea{min-height:90px}
#modal #error{flex:0 0 auto;margin:0;padding:0 20px;background:var(--paper)}#modal #error:empty{display:none}
.sheet-footer{flex:0 0 auto;padding:14px 20px 18px;background:var(--paper);box-shadow:0 -8px 18px #f7f4eecf;border-top:1px solid #e9e4da;position:relative;z-index:2}
.sheet-footer #submit{margin:0;width:100%;min-height:52px;border-radius:20px}
#modal.proto-statistics .sheet-footer:has(#submit[hidden]){display:none}
.tasks-sheet .sheet-scroll>:last-child{margin-bottom:10px}.tasks-sheet .notification-settings{padding-bottom:8px}
.tasks-sheet .calendar-day{min-height:46px}.tasks-sheet .calendar-header{gap:10px}.tasks-sheet .calendar-header>b{font-size:calc(15px + 2pt)}
@media(max-height:520px){dialog#modal,dialog.tasks-sheet{height:calc(var(--sheet-viewport,100dvh) - 24px);border-radius:22px}.sheet-footer{padding-top:10px;padding-bottom:12px}}

/* Calm material behind active panels: blur is static, only opacity transitions. */
dialog#modal::backdrop,dialog.tasks-sheet::backdrop,dialog.date-picker::backdrop{background:rgba(22,42,33,.24);backdrop-filter:blur(12px) saturate(.85);-webkit-backdrop-filter:blur(12px) saturate(.85);opacity:0;transition:opacity 150ms var(--ease-out)}
dialog#modal[data-glass-open]::backdrop,dialog.tasks-sheet[data-glass-open]::backdrop,dialog.date-picker[data-glass-open]::backdrop{opacity:1;transition-duration:180ms}
dialog.date-picker{opacity:0;transform:translateY(10px) scale(.98);transition:opacity 150ms var(--ease-out),transform 180ms var(--ease-out)}
dialog.date-picker[data-glass-open]{opacity:1;transform:translateY(0) scale(1)}
nav .proto-nav-indicator{position:absolute;left:0;top:6px;width:100px;height:calc(100% - 12px);border-radius:24px;background:#e2f0e3;pointer-events:none;transform-origin:left center;opacity:0;transition:transform 180ms var(--ease-out);z-index:0}
nav button{position:relative;z-index:1}nav button.active{background:transparent!important}main#app{animation:none}
@media(prefers-reduced-motion:reduce){nav .proto-nav-indicator{transition:none!important}dialog.date-picker{transform:none!important;transition:opacity 125ms var(--ease-out)}dialog::backdrop{transition:opacity 125ms var(--ease-out)!important}}
@media(prefers-reduced-transparency:reduce){dialog#modal::backdrop,dialog.tasks-sheet::backdrop,dialog.date-picker::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:rgba(20,35,28,.48)}}
@media(prefers-contrast:more){dialog#modal,dialog.tasks-sheet,dialog.date-picker{border:1px solid #526358}dialog::backdrop{background:rgba(10,25,17,.55)}}

/* Acciones claras: alta en verde y traslado en azul. */
body[data-view=animals] #app>.row{display:block;margin:0 0 16px}
body[data-view=animals] #app>.row>button[data-action="animal"]{display:block;width:100%;min-height:52px;background:var(--green);color:#fff;border:0;border-radius:18px;padding:13px 20px;font-weight:650;font-size:calc(14px + 2pt);text-align:center}
.proto-animal-actions button+button{background:#dceaf4;color:#285d7a}
.proto-animal-actions button+button:active{background:#d0e2ef}

body[data-view=events] #app>.records-primary-action{display:block;margin:0 0 16px}
body[data-view=events] .records-primary-action>button{display:block;width:100%;min-height:52px;background:var(--green);color:#fff;border:0;border-radius:18px;padding:13px 20px;font-weight:650;font-size:calc(14px + 2pt);text-align:center}

body[data-view=home] .proto-period .periods{display:flex;flex-direction:column;align-items:stretch;gap:8px}
body[data-view=home] .proto-period .periods select{width:100%;max-width:none;min-height:48px;border-radius:18px}
body[data-view=home] .proto-period .periods>p{max-width:none;width:100%;text-align:left;margin:0 0 4px;font-size:calc(12px + 2pt);font-variant-numeric:tabular-nums}

body[data-view=health] #app>.row{display:block;margin:0 0 16px}
body[data-view=health] #app>.row>button[data-action="health"]{display:block;width:100%;min-height:52px;background:var(--green);color:#fff;border:0;border-radius:18px;padding:13px 20px;font-weight:650;font-size:calc(14px + 2pt);text-align:center}

.reminder-fields{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin:18px 0}
.reminder-fields>summary{font-weight:600;color:var(--ink);min-height:38px;line-height:1.4}
.reminder-fields .reminder-toggle{font-weight:400;align-items:flex-start;line-height:1.45;margin:12px 0 4px}
.reminder-fields .reminder-toggle input{margin-top:2px;accent-color:var(--green);border-radius:6px}
.reminder-fields details>summary{font-weight:400}

.reminder-add-icon{display:inline-grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;background:transparent;color:var(--green);font-size:calc(26px + 2pt);font-weight:400;line-height:1;cursor:pointer}
.reminder-add-icon:active{background:var(--mint)}

#bulkToolbar #bulkVaccinate{width:100%;border-radius:18px;min-height:52px;margin:6px 0;font-size:calc(14px + 2pt)}
.bulk-selection-count{color:var(--green);margin:0 0 18px;font-weight:600}
.activity-animal-review{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin:12px 0}
.activity-animal-review>b,.activity-animal-review>small{display:block}.activity-animal-review>small{margin-top:4px;color:var(--muted)}

/* Reducir el costo del material en teléfonos sin quitar la separación visual. */
@media(max-width:650px){
 dialog#modal::backdrop,dialog.tasks-sheet::backdrop,dialog.date-picker::backdrop{backdrop-filter:blur(8px) saturate(.85);-webkit-backdrop-filter:blur(8px) saturate(.85)}
 nav{backdrop-filter:blur(12px) saturate(130%);-webkit-backdrop-filter:blur(12px) saturate(130%)}
 .search-glass-bar:before,#globalSearchToggle,.search-results-glass{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
}
@media(prefers-reduced-transparency:reduce){nav,.search-glass-bar:before,#globalSearchToggle,.search-results-glass,dialog#modal::backdrop,dialog.tasks-sheet::backdrop,dialog.date-picker::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Backdrop follows the sheet instead of finishing before the panel leaves. */
dialog#modal[data-closing]::backdrop,dialog.tasks-sheet[data-closing]::backdrop{opacity:var(--sheet-backdrop-opacity,1);transition:none!important}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}

/* The entire date field is a tap target, including the native indicator layer. */
input[type="date"]{position:relative;cursor:pointer;min-height:48px;touch-action:manipulation}
input[type="date"]::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}
select{cursor:pointer;min-height:48px;touch-action:manipulation}

.animal-year-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}
.animal-year-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:132px;padding:16px;border:1px solid var(--line);border-radius:22px;background:#fff;color:var(--ink);text-align:left;font:inherit;cursor:pointer}
.animal-year-card>span{font-size:1.1em;font-weight:650}.animal-year-card>strong{font-size:2em;line-height:1.2;margin-top:12px;font-variant-numeric:tabular-nums}.animal-year-card>small{color:#4b6256}.animal-year-card>svg{position:absolute;right:14px;bottom:18px;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.animal-year-card:nth-child(4n+1){background:#deeee2}.animal-year-card:nth-child(4n+2){background:#f9e4d6}.animal-year-card.is-selected{background:#2b8053;color:#fff;border-color:#2b8053}.animal-year-card.is-selected>small{color:#fff}
.animal-recent>.row{align-items:center;margin-bottom:12px}.animal-recent h2{margin:0;font-size:1.2em}.animal-see-more{display:block;margin:16px auto 0;text-decoration:underline;text-underline-offset:3px;min-height:44px}
@media(min-width:720px){.animal-year-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

#animalBrowseTitle{scroll-margin-top:24px}

.password-control{position:relative;min-width:0}.password-control input{width:100%;padding-right:56px!important}.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;min-height:44px;padding:10px;border:0;background:transparent;color:#23553d;border-radius:12px}.password-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.password-toggle:active{transform:translateY(-50%) scale(.975)}

.steak-loading{display:grid;justify-items:center;gap:12px;padding:24px;text-align:center;color:#173f35}.steak-loader{width:144px;height:126px}.steak-flip{transform-origin:80px 90px;animation:steak-flip 1.4s ease-in-out infinite}.steak-steam{animation:steak-steam 1.4s ease-in-out infinite}#iosBusy[hidden]{display:none}@keyframes steak-flip{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}@keyframes steak-steam{0%,100%{transform:translateY(0);opacity:.4}50%{transform:translateY(-8px);opacity:.9}}@media(prefers-reduced-motion:reduce){.steak-flip,.steak-steam{animation:none}}

/* Consistent spacing and feedback on mobile. */
body[data-view="health"] .section>.animal{margin-bottom:12px;width:100%}
#toast[data-kind="error"]{background:#8c3029;color:#fff}
#toast[data-kind="success"]{background:#173f35;color:#fff}
html,body{touch-action:pan-x pan-y}

/* Original illustrated landscape for the Animals tab. */
body[data-farm="caramas1"] #prototypeScene{background-image:url("./animales-paisaje-v1.webp");background-position:center 68%}
body[data-farm="bendicion"] #prototypeScene{background-image:url("./bendicion-ilustrada-v1.webp");background-position:center 57%}

.event[role="button"]{cursor:pointer}.event[role="button"]:focus-visible{outline:2px solid var(--green);outline-offset:4px}.event[role="button"]:active{background:#e3eee3}.correction-row{padding:14px 0}.correction-row+.correction-row{border-top:1px solid #e2dad1}.correction-row .actions{margin-top:6px}

/* Approved original GIF: do not layer another motion effect over it. */
.steak-loading .steak-loader{display:block;width:210px;max-width:100%;height:auto;animation:none}

/* Shared action controls: same typography, icons and placement across tabs. */
#app .ui-filter,#app .ui-select{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:transparent;border:0;border-radius:8px;box-shadow:none;color:#285c40;font:inherit;font-size:calc(13px + 2pt);font-weight:400;min-height:44px;min-width:44px;padding:8px 2px;white-space:nowrap;cursor:pointer}
#app .ui-filter svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#app .ui-select svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#app .ui-select span{text-decoration:underline;text-underline-offset:3px}#app .ui-filter{margin-right:auto}#app .ui-select{margin-left:auto}#app .ui-filter:focus-visible,#app .ui-select:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.bulk-toolbar{display:flex;justify-content:space-between;align-items:center;margin:0 0 14px;gap:10px}.bulk-selection-actions{width:100%;display:flex;flex-wrap:wrap;gap:8px}.bulk-selection-actions .primary{width:100%}.animal-count{margin:4px 0 0;color:#687266;font-size:calc(12px + 2pt)}
#animalFilters:not([open]){margin:0;padding:0}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;border:0}
#startupScreen{position:fixed;inset:0;z-index:10000;background:#f7f6f0;display:grid;place-items:center;opacity:1;transition:opacity 220ms ease-out;pointer-events:auto}#startupScreen.leaving{opacity:0;pointer-events:none}#startupScreen .steak-loading{padding:24px;max-width:100%;box-sizing:border-box}#startupScreen p{font-size:18px;color:#173f35;margin:12px 0 0}
@media(prefers-reduced-motion:reduce){#startupScreen{transition:none}}
