/* Vital Buffalo Farm - shared theme. Brand colors from the farm logo: tan #E9A55A and brown #2B1A10. */
:root {
  --brand-tan: #E9A55A;
  --brand-brown: #2B1A10;
  --cream: #fbf5e8;
  --paper: #fffcf5;
  --sand: #f1dfbd;
  --gold: var(--brand-tan);
  --gold-d: #a8691f;
  --brown: #5a3b24;
  --brown-d: var(--brand-brown);
  --link: #8a4b12;
  --rust: #b5532a;
  --grass: #6b8f3a;
  --grass-d: #4d6b27;
  --sky: #a9d3df;
  --ink: var(--brand-brown);
  --radius: 16px;
  --shadow: 0 4px 0 rgba(90, 59, 36, .18), 0 10px 24px rgba(90, 59, 36, .12);
  --serif: Rockwell, "Rockwell Nova", "American Typewriter", "Roboto Slab", Georgia, Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); line-height: 1.6;
  background: var(--cream);
  background-image: radial-gradient(circle at 20% 0, rgba(233,165,90,.14), transparent 40%);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--brown-d); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--brown-d); }
:focus-visible { outline: 3px solid var(--gold-d); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brown-d); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* header + nav */
.site-header { background: var(--brand-brown); color: var(--cream); border-bottom: 5px solid var(--brand-tan); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand { min-width: 0; }
.brand img { width: 46px; height: 46px; flex: none; border-radius: 50%; }
@media (max-width: 480px) { .brand { font-size: 1rem; gap: 8px; } .brand img { width: 38px; height: 38px; } }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.nav a { color: var(--cream); text-decoration: none; padding: 8px 11px; border-radius: 999px; font-size: .95rem; }
.nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav a[aria-current="page"] { background: var(--brand-tan); color: var(--brand-brown); font-weight: 700; }
.nav-toggle { display: none; background: var(--brand-tan); color: var(--brand-brown); border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 940px) {
  .js .nav-toggle { display: inline-block; }
  .js .nav { display: none; width: 100%; flex-direction: column; padding-bottom: 8px; }
  .js .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* hero */
.hero { background: linear-gradient(#fdf7ea 0%, #f6e1bd 100%); border-bottom: 6px solid var(--brand-tan); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: end; padding-top: 34px; min-height: 340px; }
.hero h1 { color: var(--brown-d); text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.hero p.lead { font-size: 1.12rem; max-width: 34em; }
.hero .art { align-self: end; margin-bottom: -4px; }
.hero .art svg { width: 100%; max-width: 380px; display: block; margin-left: auto; }
.hero-sun { display: none; position: absolute; right: 8%; top: 18px; width: 70px; height: 70px; border-radius: 50%; background: #ffe08a; box-shadow: 0 0 0 12px rgba(255,224,138,.35), 0 0 0 26px rgba(255,224,138,.18); }
.hero .wrap > * { position: relative; z-index: 1; }
.hero.small .wrap { min-height: 180px; padding-top: 26px; padding-bottom: 8px; }
@media (max-width: 700px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero .art svg { max-width: 260px; margin: 0 auto; }
  .hero-sun { width: 44px; height: 44px; right: 6%; }
}

/* layout bits */
main { display: block; }
section.block { padding: 36px 0; }
section.alt { background: var(--paper); border-top: 2px dashed var(--sand); border-bottom: 2px dashed var(--sand); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 2px solid var(--sand); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s ease; }
a.card:hover, a.card:focus-visible { transform: translateY(-4px) rotate(-.4deg); }
.card .thumb { height: 120px; display: flex; align-items: flex-end; justify-content: center; border-radius: 12px; margin-bottom: 12px; background: linear-gradient(#cfe7ee, #f6e9c6 70%, #8aa84b 70.1%); overflow: hidden; }
.card .thumb svg { height: 110px; width: auto; }
.card .thumb.herd3 svg { height: 76px; margin: 0 -9px; }
.card .thumb .emoji { font-size: 3.2rem; align-self: center; }
.btn { display: inline-block; background: var(--brand-tan); color: var(--brand-brown); border: 0; border-bottom: 4px solid var(--gold-d); border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s ease; touch-action: manipulation; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: var(--brand-brown); }
.btn:active { transform: translateY(1px); }
.btn.green { background: var(--grass-d); color: #fff; border-bottom-color: #364d1b; }
.btn.ghost { background: transparent; border: 2px solid var(--brown); color: var(--brown); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; filter: grayscale(.4); transform: none; }
.facts-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.facts-list li { background: var(--paper); border-left: 6px solid var(--gold); padding: 10px 14px; border-radius: 0 12px 12px 0; }
dl.glance { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.glance dt { font-weight: 700; color: var(--brown); }
dl.glance dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.glance { grid-template-columns: 1fr; gap: 0; } dl.glance dd { margin-bottom: 10px; } }
.tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: var(--sand); color: var(--brown); border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.sources { font-size: .9rem; overflow-wrap: anywhere; }
.sources li { margin-bottom: 4px; }
.callout { background: #fff1c9; border: 2px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 4px solid var(--gold); }
.timeline li { padding: 0 0 18px 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -11px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--rust); border: 3px solid var(--cream); }
.timeline strong { color: var(--brown-d); }

/* placeholder badge */
.placeholder { display: inline-block; background: #fff0b8; color: #7a4b00; border: 2px dashed #d39b1a; border-radius: 8px; padding: 0 8px; font-size: .88em; font-weight: 600; line-height: 1.5; }

footer.site-footer { background: var(--brand-brown); color: #f0e2c6; padding: 26px 0; margin-top: 30px; font-size: .92rem; }
footer.site-footer a { color: var(--brand-tan); }

/* notices / toast */
.notice { background: #fde3d6; border: 2px solid var(--rust); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .92rem; }
#toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
.toast { background: var(--brand-brown); color: #fff; border: 3px solid var(--brand-tan); border-radius: 14px; padding: 10px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: toastIn .35s cubic-bezier(.2,1.4,.4,1), toastOut .4s ease 3.6s forwards; }
@keyframes toastIn { from { transform: translateY(30px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* games shared */
.game-head { margin-bottom: 14px; }
.panel { background: var(--paper); border: 2px solid var(--sand); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===== Adopt ===== */
.choose-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 14px 0; padding: 0; list-style: none; }
.pick { width: 100%; text-align: center; font: inherit; color: inherit; background: var(--paper); border: 3px solid var(--sand); border-radius: var(--radius); padding: 10px 8px 12px; cursor: pointer; transition: transform .15s; touch-action: manipulation; }
.pick:hover { transform: translateY(-3px); border-color: var(--gold); }
.pick[aria-pressed="true"] { border-color: var(--rust); background: #fff1c9; transform: translateY(-3px) scale(1.02); }
.pick .art { height: 84px; display: flex; justify-content: center; align-items: flex-end; }
.pick .art svg { height: 84px; width: auto; }
.pick strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.pick span.pers { display: block; font-size: .82rem; color: #6a5340; line-height: 1.3; }
.name-form { margin-top: 10px; }
.name-form label { font-weight: 700; display: block; margin-bottom: 4px; }
input[type="text"] { font: inherit; padding: 9px 12px; border: 2px solid var(--brown); border-radius: 10px; background: #fff; min-width: 0; width: 100%; max-width: 280px; }
.err { color: var(--rust); font-weight: 600; min-height: 1.4em; margin: 6px 0 0; }
.care-layout { display: grid; gap: 18px; grid-template-columns: 1.15fr .85fr; align-items: start; }
@media (max-width: 820px) { .care-layout { grid-template-columns: 1fr; } }
/* stage: sky and hills are an inline SVG (.st-bg); clouds drift on the shared dispatcher */
.stage { position: relative; height: 270px; border-radius: var(--radius); overflow: hidden; border: 3px solid var(--grass-d); background: linear-gradient(#bfe0ea 0%, #f6e9c6 55%, #8aa84b 55.1%, #6b8f3a 100%); }
.stage .st-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 62%, rgba(255,224,138,.8), rgba(255,224,138,0) 62%); opacity: 0; }
.stage.s-bless::after { animation: blessglow 2.2s ease-in-out; }
@keyframes blessglow { 0%, 100% { opacity: 0; } 35%, 65% { opacity: 1; } }
.pet { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 14px; width: min(320px, 82%); transform-origin: 50% 100%; z-index: 2; }
.pet svg { width: 100%; height: auto; display: block; overflow: visible; }
.pet.p-play { animation: trot 2.4s ease-in-out; }
@keyframes trot {
  10% { transform: translate(-2%, 2px) scale(1, .97); }
  24% { transform: translate(calc(var(--dx, 80px) * -1), calc(var(--lift, 44px) * -.55)) rotate(-7deg) scale(.95); }
  38% { transform: translate(calc(var(--dx, 80px) * -.46), calc(var(--lift, 44px) * -.95)) rotate(-3deg) scale(.9); }
  50% { transform: translate(0, calc(var(--lift, 44px) * -1)) rotate(0deg) scale(.88); }
  62% { transform: translate(calc(var(--dx, 80px) * .46), calc(var(--lift, 44px) * -.95)) rotate(3deg) scale(.9); }
  76% { transform: translate(var(--dx, 80px), calc(var(--lift, 44px) * -.55)) rotate(7deg) scale(.95); }
  92% { transform: translate(3%, 2px) scale(1, .98); }
}
.mound { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: -2px; width: min(300px, 90%); height: var(--mh, 80px); z-index: 1; opacity: 0; transform: translateY(100%); pointer-events: none; }
.mound svg { display: block; width: 100%; height: 100%; }
.stage.s-play .mound { animation: moundrise 2.4s ease-in-out; }
@keyframes moundrise { 0% { opacity: 0; transform: translateY(100%); } 14%, 82% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(70%); } }
.fx { position: absolute; pointer-events: none; z-index: 5; }
.fx.num { left: 12px; top: 12px; width: max-content; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--brown-d); background: rgba(255,250,240,.92); border-radius: 999px; padding: 0 10px; animation: chip 1.5s ease-out forwards; }
@keyframes chip { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 18%, 70% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-10px); } }
.pt { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none; z-index: 6; opacity: 0; animation: pfly var(--t, 1.1s) ease-out var(--w, 0s) forwards; }
.pt svg { display: block; width: 100%; height: 100%; }
.pt.blade { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
@keyframes pfly {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.5); }
  15% { opacity: 1; transform: translate(calc(var(--dx) * .25), calc(var(--dy) * .25)) rotate(calc(var(--rot, 0deg) * .25)) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot, 0deg)) scale(.9); }
}
.pet-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pet-name h2 { margin: 0; overflow-wrap: anywhere; }
.mood { display: inline-flex; align-items: center; gap: 6px; background: var(--sand); border-radius: 999px; padding: 2px 12px; font-weight: 700; }
.mood .face { font-size: 1.4rem; }
.mood.thriving { background: #d8ecb7; } .mood.grumpy { background: #fbd9b6; } .mood.needs { background: #f6c2b4; }
.bars { display: grid; gap: 10px; margin: 12px 0; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 36px; gap: 8px; align-items: center; font-weight: 600; font-size: .92rem; }
.meter { height: 16px; background: #e8d8b3; border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0,0,0,.15); }
.meter > i { display: block; position: relative; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); transition: transform .7s cubic-bezier(.25, .8, .3, 1); }
.meter > i > b { position: absolute; inset: 0; border-radius: 999px; opacity: 0; transition: opacity .4s ease; }
.meter > i > b.o { background: var(--grass); } .meter > i > b.m { background: var(--gold); } .meter > i > b.l { background: var(--rust); }
.meter > i.ok > b.o, .meter > i.mid > b.m, .meter > i.low > b.l { opacity: 1; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 560px) { .actions { grid-template-columns: repeat(4, 1fr); } }
.act { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; font: inherit; font-weight: 700; color: var(--brown-d); background: #ffe9a8; border: 2px solid var(--gold); border-bottom-width: 5px; cursor: pointer; touch-action: manipulation; min-height: 64px; transition: transform .12s ease; }
.act .e { font-size: 1.6rem; line-height: 1; }
.act .e svg { display: block; width: 1.41em; height: 1em; margin: 0 auto; }
.act small { font-weight: 500; font-size: .72rem; color: #6a5340; }
.act:hover:not([disabled]) { transform: translateY(-2px); }
.act:active:not([disabled]) { transform: translateY(2px); }
.act[disabled] { cursor: not-allowed; opacity: .6; }
.act .cd { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: var(--rust); transform-origin: left; transform: scaleX(0); }
.act.cooling .cd { animation: cool 3s linear forwards; }
@keyframes cool { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.bless { width: 100%; margin-top: 12px; padding: 12px; font-size: 1.05rem; }
.bless { position: relative; }
.bless.season { background: var(--rust); color: #fff; border-bottom-color: #7e3516; }
.bless.season::after { content: ""; position: absolute; inset: -3px; border: 3px solid rgba(217,164,65,.9); border-radius: 999px; opacity: 0; animation: ring 1.6s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: .9; transform: scale(.97); } 100% { opacity: 0; transform: scale(1.08, 1.35); } }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.badge { text-align: center; font-size: .75rem; line-height: 1.2; padding: 8px 4px; border-radius: 12px; border: 2px dashed var(--sand); color: #8c7660; background: rgba(255,255,255,.5); }
.badge .e { display: block; font-size: 1.7rem; filter: grayscale(1); opacity: .45; }
.badge.got { border: 2px solid var(--gold); color: var(--brown-d); background: #fff1c9; font-weight: 700; }
.badge.got .e { filter: none; opacity: 1; }
.badge.got.new .e { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.journal li { background: #fff; border-left: 5px solid var(--grass); border-radius: 0 10px 10px 0; padding: 8px 10px; font-size: .9rem; }
.journal a { font-size: .78rem; }
.side { display: grid; gap: 16px; }
.confetti { position: fixed; top: -20px; font-size: 1.4rem; pointer-events: none; z-index: 80; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .9; } }

/* ===== Herd ===== */
.game-wrap { position: relative; width: 100%; max-width: 900px; margin: 0 auto; }
#herdCanvas { display: block; width: 100%; background: #8aa84b; box-shadow: 0 0 0 4px var(--grass-d); border-radius: var(--radius); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
.hud { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; }
.hud .stats { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.hud .chip { background: var(--sand); border-radius: 999px; padding: 2px 12px; font-variant-numeric: tabular-nums; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; background: rgba(58,36,22,.55); border-radius: var(--radius); overflow: auto; }
.overlay[hidden] { display: none; }
.overlay:not([hidden]) { animation: ovin .35s ease both; }
.overlay:not([hidden]) .box { animation: boxin .4s cubic-bezier(.2,.9,.3,1) both; }
@keyframes ovin { from { opacity: 0; } }
@keyframes boxin { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.overlay .box { background: var(--paper); border: 4px solid var(--gold); border-radius: var(--radius); padding: 16px 18px; max-width: 460px; width: 100%; text-align: center; max-height: 100%; overflow: auto; }
.overlay .box h2 { margin-bottom: .3em; font-size: clamp(1.2rem, 4vw, 1.7rem); }
.overlay .box p { margin-bottom: .7em; font-size: .95rem; }
/* narrow screens: overlays sit below the canvas so the game stays visible; short windows: tighter header */
@media (max-width: 600px) { .overlay { position: static; background: none; padding: 10px 0 0; overflow: visible; } .overlay .box { max-height: none; } }
@media (max-width: 480px) { .overlay .box p.more { display: none; } .overlay .box { padding: 10px 12px; } .overlay .box p { font-size: .85rem; margin-bottom: .4em; } }
@media (max-height: 700px) { .game-head.compact p { display: none; } .game-head.compact h1 { font-size: 1.5rem; margin-bottom: .2em; } .hud { margin-bottom: 6px; } }

/* ===== Quiz ===== */
.quiz-card { max-width: 720px; margin: 0 auto; }
.progress { height: 12px; background: #e8d8b3; border-radius: 999px; overflow: hidden; margin: 8px 0 16px; }
.progress > i { display: block; height: 100%; background: var(--grass); width: 100%; transform-origin: left; transform: scaleX(0); transition: transform .4s ease; }
.q-text { font-family: var(--serif); font-size: clamp(1.15rem, 3.8vw, 1.5rem); margin-bottom: 14px; }
.choices { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.choice { width: 100%; text-align: left; font: inherit; padding: 12px 14px; border-radius: 14px; background: #fff; color: var(--ink); border: 2px solid var(--sand); border-bottom-width: 5px; cursor: pointer; display: flex; gap: 10px; align-items: center; touch-action: manipulation; transition: transform .12s ease; }
.choice:hover:not([disabled]) { border-color: var(--gold); transform: translateY(-2px); }
.choice:active:not([disabled]) { transform: translateY(1px); }
.choice .k { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.choice.right { background: #dcefc0; border-color: var(--grass); animation: pop .4s; }
.choice.wrong { background: #fbd9cc; border-color: var(--rust); animation: shake .4s; }
.choice[disabled] { cursor: default; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fff1c9; border: 2px solid var(--gold); }
.feedback strong.ok { color: var(--grass-d); } .feedback strong.no { color: var(--rust); }
.result { text-align: center; }
.result .score { font-family: var(--serif); font-size: 3.4rem; color: var(--rust); margin: 0; }
.result .rank { font-size: 1.4rem; font-weight: 700; color: var(--brown-d); }

/* ===== Farm photos, event, mascot (farm-supplied images) ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo-lg { display: block; width: 100%; max-width: 220px; height: auto; border-radius: 50%; margin: 0 0 14px; border: 4px solid var(--brand-brown); background: var(--brand-brown); }
.hero.has-photo .wrap { align-items: center; padding-bottom: 28px; }
.hero-photo { margin: 0 0 0 auto; width: 100%; max-width: 420px; }
.hero-photo.hero-photo-sm { max-width: 480px; }
.hero-photo img { display: block; width: 100%; height: auto; border-radius: 14px; border: 4px solid var(--brand-brown); }
@media (max-width: 700px) { .hero-photo { margin: 0 auto; } .logo-lg { max-width: 160px; } }
.event-banner { background: var(--brand-brown); color: #f7ebd2; text-align: center; padding: 14px 0 6px; }
.event-banner p { margin: 0 0 8px; }
.event-banner .event-line { font-size: 1.1rem; }
.event-banner a { color: var(--brand-tan); }
.countdown { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--brand-tan); }
.hero .countdown { color: var(--brand-brown); background: var(--brand-tan); display: inline-block; padding: 4px 16px; border-radius: 999px; font-size: 1.25rem; }
.countdown[hidden] { display: none; }
.small { font-size: .9rem; }
blockquote.farm-quote { margin: 0 0 16px; padding: 10px 16px; border-left: 6px solid var(--brand-tan); background: var(--paper); border-radius: 0 12px 12px 0; }
blockquote.farm-quote p { margin: 0 0 .5em; font-family: var(--serif); font-size: 1.05rem; }
blockquote.farm-quote footer { font-size: .85rem; color: #5a3b24; }
blockquote.farm-quote footer::before { content: "\2014 "; }
.story { display: grid; gap: 20px; grid-template-columns: minmax(0, 340px) 1fr; align-items: start; }
.story-fig { margin: 0 0 16px; }
.story-fig img { display: block; width: 100%; max-width: 340px; height: auto; border-radius: 12px; border: 3px solid var(--sand); }
@media (max-width: 700px) { .story { grid-template-columns: 1fr; } }
.tiles { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.tile { margin: 0; width: 100%; max-width: 206px; }
.tile.wide { max-width: 240px; }
.tile.photo-320 { max-width: 300px; }
.tile img { display: block; width: 100%; height: auto; border-radius: 10px; border: 3px solid var(--sand); }
.tile figcaption { font-size: .85rem; line-height: 1.3; padding-top: 4px; }
@media (max-width: 480px) { .tiles .tile { width: calc(50% - 7px); } }
.intro-row { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-bottom: 8px; }
.intro-row p { margin: 0; }
.mascot-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.mascot-row > img { width: 130px; height: auto; flex: none; }
.mascot-row > div, .mascot-row > p { flex: 1 1 220px; min-width: 0; margin: 0; }
.tip-panel .mascot-row { flex-wrap: nowrap; }
.tip-panel .mascot-row > img { width: 84px; }
.tip-panel p { margin: 0; }
.mascot-img { display: block; width: 100%; max-width: 220px; height: auto; margin-left: auto; }
table.schedule { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--sand); }
table.schedule th, table.schedule td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--sand); }
table.schedule thead th { background: var(--brand-brown); color: #f7ebd2; }
table.schedule tbody th { white-space: nowrap; width: 1%; color: var(--brand-brown); font-weight: 700; }
@media (max-width: 480px) { table.schedule th, table.schedule td { padding: 6px 8px; font-size: .92rem; } table.schedule tbody th { white-space: normal; width: 5.5em; } }
.flyer { margin: 18px 0 0; }
.flyer img { display: block; width: 100%; max-width: 526px; height: auto; border-radius: 10px; border: 3px solid var(--sand); }

/* ===== Buffalo art: pose by mood (custom properties), idle motion, one reaction per care action ===== */
.buffalo-svg { display: block; overflow: visible; --mr: 0deg; --my: 0px; --tail: 0deg; --ear: 0deg; }
.buffalo-svg.mood-thriving { --mr: -7deg; --my: -4px; --tail: 18deg; --ear: 10deg; }
.buffalo-svg.mood-grumpy { --mr: 5deg; --my: 3px; --tail: -4deg; --ear: -24deg; }
.buffalo-svg.mood-needs { --mr: 13deg; --my: 8px; --tail: -12deg; --ear: -16deg; }
.buffalo-svg .b-face { display: none; }
.buffalo-svg.mood-thriving .f-thriving, .buffalo-svg.mood-content .f-content, .buffalo-svg.mood-grumpy .f-grumpy, .buffalo-svg.mood-needs .f-needs { display: inline; }
.buffalo-svg .b-rig, .buffalo-svg .b-breath, .buffalo-svg .b-head, .buffalo-svg .b-tail, .buffalo-svg .b-ear, .buffalo-svg .b-eyes, .buffalo-svg .b-beard, .buffalo-svg .b-leg { transform-box: fill-box; }
.buffalo-svg .b-rig { transform-origin: 50% 100%; }
.buffalo-svg .b-breath { transform-origin: 50% 96%; animation: breathe 3.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.buffalo-svg .b-head { transform-origin: 22% 38%; transform: translateY(var(--my)) rotate(calc(var(--mr) + var(--ht, 0deg))); transition: transform .7s ease; }
.buffalo-svg .b-tail { transform-origin: 100% 0%; transform: rotate(var(--tail)); animation: swish 5.3s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * 1.3); }
.buffalo-svg .b-ear { transform-origin: 100% 70%; transform: rotate(var(--ear)); animation: earflick 11s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * 1.7); }
.buffalo-svg .b-eyes { transform-origin: 50% 50%; animation: blink 6.7s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * 0.9); }
.buffalo-svg .b-leg { transform-origin: 50% 0%; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.004, 1.018); } }
@keyframes swish { 0%, 100% { transform: rotate(calc(var(--tail) - 3deg)); } 50% { transform: rotate(calc(var(--tail) + 9deg)); } }
@keyframes earflick { 0%, 88%, 100% { transform: rotate(var(--ear)); } 91% { transform: rotate(calc(var(--ear) + 16deg)); } 94% { transform: rotate(calc(var(--ear) - 5deg)); } 97% { transform: rotate(calc(var(--ear) + 8deg)); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
/* reactions (class on the svg root, set for the length of the reaction) */
.buffalo-svg.r-feed .b-head { animation: feedhead 2.2s ease-in-out; }
.buffalo-svg.r-feed .b-beard { animation: chew .36s ease-in-out .35s 5; }
@keyframes feedhead { 18%, 80% { transform: translateY(11px) rotate(17deg); } }
@keyframes chew { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.buffalo-svg.r-water .b-head { animation: drinkhead 2s ease-in-out; }
@keyframes drinkhead { 16%, 40%, 64% { transform: translateY(15px) rotate(23deg); } 28%, 52%, 76% { transform: translateY(11px) rotate(18deg); } }
.buffalo-svg.r-brush .b-rig { animation: shake 1.5s ease-in-out; }
.buffalo-svg.r-brush .b-tail { animation: tailfast .25s ease-in-out 6; }
@keyframes shake { 10% { transform: rotate(-2.2deg) translateX(-2px); } 25% { transform: rotate(2deg) translateX(2px); } 40% { transform: rotate(-1.6deg) translateX(-1.5px); } 55% { transform: rotate(1.3deg) translateX(1.5px); } 70% { transform: rotate(-.8deg); } 85% { transform: rotate(.4deg); } }
@keyframes tailfast { 0%, 100% { transform: rotate(calc(var(--tail) - 8deg)); } 50% { transform: rotate(calc(var(--tail) + 16deg)); } }
.buffalo-svg.r-play .b-leg-hn, .buffalo-svg.r-play .b-leg-ff { animation: legA .3s ease-in-out 8; }
.buffalo-svg.r-play .b-leg-hf, .buffalo-svg.r-play .b-leg-fn { animation: legB .3s ease-in-out 8; }
.buffalo-svg.r-play .b-head { animation: trothead .6s ease-in-out 4; }
@keyframes legA { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes legB { 0%, 100% { transform: rotate(9deg); } 50% { transform: rotate(-9deg); } }
@keyframes trothead { 0%, 100% { transform: translateY(-3px) rotate(-5deg); } 50% { transform: translateY(1px) rotate(1deg); } }
.buffalo-svg.r-bless .b-head { animation: blesshead 2.2s ease-in-out; }
@keyframes blesshead { 20%, 75% { transform: translateY(-5px) rotate(-12deg); } }
/* Geronimo: bounce and nod when a tip appears (never a talking mouth) */
.buffalo-svg.mascot.tip .b-rig { animation: gbounce .9s ease-out; }
.buffalo-svg.mascot.tip .b-head { animation: gnod .9s ease-in-out; }
@keyframes gbounce { 0% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(1px) scale(1.02, .96); } 40% { transform: translateY(-12px) scale(.99, 1.02); } 70% { transform: translateY(0) scale(1.02, .97); } 85% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
@keyframes gnod { 35%, 75% { transform: translateY(3px) rotate(9deg); } 55% { transform: translateY(0) rotate(0deg); } }
.mascot-row > .gmascot { width: 130px; flex: none; }
.tip-panel .mascot-row > .gmascot { width: 96px; flex: none; }
.gmascot svg { width: 100%; height: auto; }

/* ===== Home hero scene, dividers, reveal ===== */
.hero-art { position: relative; width: 100%; max-width: 470px; margin: 0 0 0 auto; aspect-ratio: 480 / 420; border-radius: 18px; overflow: hidden; border: 4px solid var(--brand-brown); background: #cfe7ee; }
.hero-art .scene-host, .hero-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* logo.webp is the round badge on a photo; the circle clip keeps just the badge over the drawn scene */
.hero-art .logo-hero { position: absolute; inset: 0; margin: auto; width: min(90%, 420px); height: auto; clip-path: circle(45.8% at 50% 50%); }
@media (max-width: 700px) { .hero-art { margin: 0 auto; max-width: 380px; } }
.scene .sc-grass { transform-box: fill-box; transform-origin: 50% 100%; animation: grasssway 3.4s ease-in-out infinite; }
.scene .sc-grass.g2 { animation-duration: 4.1s; animation-delay: -1.3s; }
.scene .sc-grass.g3 { animation-duration: 3.7s; animation-delay: -2.2s; }
@keyframes grasssway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.4deg); } }
.divider-band { background: #E59840; text-align: center; padding: 14px 0; line-height: 0; }
.divider-band img { display: inline-block; width: 305px; max-width: 100%; height: auto; }
html.vb-io .rv { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
html.vb-io .rv.in { opacity: 1; transform: none; }
html.vb-hidden *, html.vb-hidden *::before, html.vb-hidden *::after { animation-play-state: paused !important; }

/* ===== Reduced motion: no ambient or looping animation anywhere; a reaction becomes a held pose plus a chip that fades in place ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html.vb-io .rv { opacity: 1 !important; transform: none !important; }
  .stage .fx.num { animation-duration: 1.4s !important; animation-name: chipfade; }
  @keyframes chipfade { 0% { opacity: 0; } 20%, 75% { opacity: 1; } 100% { opacity: 0; } }
  .buffalo-svg.r-feed .b-head { transform: translateY(11px) rotate(17deg); }
  .buffalo-svg.r-water .b-head { transform: translateY(15px) rotate(23deg); }
  .buffalo-svg.r-brush .b-rig { transform: rotate(-1.5deg); }
  .buffalo-svg.r-play .b-head { transform: translateY(-3px) rotate(-5deg); }
  .buffalo-svg.r-bless .b-head { transform: translateY(-5px) rotate(-12deg); }
  .stage.s-bless::after { opacity: .7; }
}

/* ===== Round 2b: footer CTA, Geronimo photo, proprietor page, guestbook ===== */
footer.site-footer a.btn { color: var(--brand-brown); }
footer.site-footer a.btn:hover { color: var(--brand-brown); }
.fb-btn { text-align: center; border-radius: 22px; line-height: 1.35; }
dl.glance dd.cap::first-letter { text-transform: uppercase; }
.mascot-row > img.photo-geronimo { width: 100%; max-width: 360px; height: auto; flex: 0 1 360px; border-radius: 12px; border: 3px solid var(--sand); }
.prop { max-width: 760px; }
.prop-fig, .bless-fig { margin: 0 0 18px; }
.prop h2 { margin-top: 1.4em; }
ul.awards { margin: 0 0 1em; padding-left: 1.2em; font-weight: 700; }
.gb-form { display: grid; gap: 4px; max-width: 520px; }
.gb-field label { font-weight: 700; display: block; margin-bottom: 4px; }
.gb-field input[type="text"], .gb-field select, .gb-field textarea { font: inherit; padding: 9px 12px; border: 2px solid var(--brown); border-radius: 10px; background: #fff; min-width: 0; width: 100%; max-width: 420px; color: var(--ink); }
.gb-field textarea { max-width: 100%; resize: vertical; }
.gb-field .err { min-height: 0; margin-top: 4px; }
.gb-check { font-weight: 400 !important; display: flex !important; gap: 8px; align-items: center; }
.gb-count { margin: 4px 0 0; }
.gb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-msg { margin: 0; font-weight: 600; }
.gb-mine { margin: 8px 0 0; }
.gb-headline { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin: 0 0 12px; }
.gb-scope { font-family: var(--sans); font-weight: 400; font-size: .85rem; margin-left: 8px; background: var(--sand); border-radius: 999px; padding: 2px 10px; }
.gb-map { margin: 0 0 12px; max-width: 640px; }
.gb-svg { display: block; width: 100%; height: auto; }
.gb-tile rect { fill: var(--sand); }
.gb-tile text { fill: var(--brown); font: 700 15px var(--sans); }
.gb-tile.lit rect { fill: var(--brand-brown); }
.gb-tile.lit text { fill: var(--brand-tan); }
.gb-star { fill: var(--brand-brown); }
.gb-tile.lit .gb-star { fill: var(--brand-tan); }
.gb-tally { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.gb-tally li { background: var(--paper); border: 2px solid var(--sand); border-radius: 999px; padding: 2px 12px; font-size: .92rem; }
.gb-comments { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.gb-comment { background: var(--paper); border-left: 6px solid var(--gold); padding: 10px 14px; border-radius: 0 12px 12px 0; overflow-wrap: anywhere; }
.gb-text { white-space: pre-line; margin: 0 0 4px; }
.gb-by { margin: 0; font-size: .9rem; color: var(--brown); }
.gb-pending { margin: 4px 0 0; font-size: .85rem; font-weight: 700; color: var(--rust); }
.gb-teaser .gb-demo { max-width: 40em; }
