:root {
  color-scheme: dark;
  --bg: #090d18; --bg2: #101729; --card: rgba(255,255,255,.055); --card2: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.11); --text: #f6f0e2; --text2: #d6d2c6; --muted: #a0a5b4;
  --gold: #e8b84a; --gold2: #f7dc8f; --gold3: #9a6d1c;
  --sire: #6aa8f7; --sire-soft: rgba(91,156,240,.16); --dam: #f4739b; --dam-soft: rgba(240,100,143,.16);
  --b-outcross: #8fd3b2; --b-light: #4fd6c0; --b-linebred: #f2c14e; --b-close: #ff9a4d; --b-tight: #ff6b5e;
  --r: 20px; --ease: cubic-bezier(.2,.8,.2,1);
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--sans); overflow-x: hidden; }
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 40% at 15% 0%, rgba(91,156,240,.20), transparent 70%), radial-gradient(70% 40% at 90% 8%, rgba(240,100,143,.14), transparent 70%), radial-gradient(90% 50% at 50% 100%, rgba(232,184,74,.08), transparent 70%); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
p { color: var(--text2); }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .center { text-align: center; } .pad { padding: 16px; }
.display { font: 800 34px/1.06 var(--serif); letter-spacing: -.3px; }
main { max-width: 720px; margin: 0 auto; }
.foot-space { height: 120px; }

/* ---------------------------------------------------------------- floating controls */
.top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 30; display: flex; justify-content: space-between; padding: 0 14px; pointer-events: none; }
.round { pointer-events: auto; min-width: 42px; height: 42px; border-radius: 999px; background: rgba(9,13,24,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); color: var(--text); font-weight: 700; display: grid; place-items: center; }
.round.back { font-size: 26px; line-height: 1; padding-bottom: 3px; visibility: hidden; }
body.on-bird .round.back { visibility: visible; }
body.no-top .top { display: none; }
.round.lang { font-size: 13px; padding: 0 12px; }
.tabs { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 25; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr; align-items: center;
  background: rgba(16,23,41,.78); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); border: 1px solid var(--line); border-radius: 26px; padding: 7px 6px; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 3px 0; transition: color .2s, transform .2s var(--ease); }
.tabs a svg { width: 25px; height: 25px; }
.tabs a.on { color: var(--gold2); transform: translateY(-1px); }
.tabs .tab-add { width: 56px; height: 56px; border-radius: 50%; justify-content: center; justify-self: center; margin-top: -26px; color: #1b1405; background: linear-gradient(145deg, #fbe7a6, #d9a441 60%, #b98a2c); box-shadow: 0 10px 26px rgba(232,184,74,.42), inset 0 1px 0 rgba(255,255,255,.5); }
.tabs .tab-add svg { width: 28px; height: 28px; }
.tabs .tab-add.on { color: #1b1405; }

/* ---------------------------------------------------------------- page entrance */
#view.enter > * { animation: rise .62s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.float { animation: floaty 6s ease-in-out infinite; }

/* ---------------------------------------------------------------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 650; color: var(--text); transition: transform .15s var(--ease), background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(145deg, #fbe7a6, #e0ad47 60%, #c2922f); color: #1b1405; border-color: transparent; box-shadow: 0 8px 22px rgba(232,184,74,.25); }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; border-radius: 16px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.danger { color: #ff9d94; border-color: rgba(255,107,94,.3); }
.btn.toggle.on { background: rgba(232,184,74,.17); border-color: rgba(232,184,74,.6); color: var(--gold2); }
.btn[disabled] { opacity: .4; box-shadow: none; }
.linkish { color: var(--muted); text-decoration: underline; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.chips.nopad { padding: 6px 0 10px; }
.chips::-webkit-scrollbar, .deck::-webkit-scrollbar, .pdeck::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 15px; font-weight: 650; font-size: 14.5px; color: var(--text2); }
.chip.on { background: var(--text); color: #0b1020; border-color: var(--text); }
.chip b { background: var(--b-close); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 12px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text2); }
input, select, textarea { width: 100%; font: 16px var(--sans); padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
select option { color: #111; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold); }
input[type=range] { padding: 0; accent-color: var(--gold); background: none; border: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-row { display: flex !important; align-items: center; gap: 9px; font-size: 15px !important; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.row-btns.center { justify-content: center; }

.star { color: var(--gold2); font-style: normal; }
.tag { display: inline-block; font: 700 10px/1 var(--sans); letter-spacing: .5px; padding: 3px 6px; border-radius: 6px; vertical-align: 2px; margin-left: 3px; background: var(--card2); color: var(--text2); font-style: normal; }
.tag.stam { background: linear-gradient(145deg, #fbe7a6, #d9a441); color: #1b1405; }
.tag.warn { background: var(--b-close); color: #1b1405; }
.tag.twice { background: rgba(232,184,74,.2); color: var(--gold2); }
.tag.both { background: rgba(255,154,77,.2); color: #ffc08c; }
.tag.st { background: rgba(255,255,255,.1); padding: 5px 9px; font-size: 11px; margin: 0; }
.b-outcross { color: var(--b-outcross); } .b-light { color: var(--b-light); } .b-linebred { color: var(--b-linebred); } .b-close { color: var(--b-close); } .b-tight { color: var(--b-tight); }
.gold-t { color: var(--gold2); }

/* ---------------------------------------------------------------- the ring */
.medal { width: 100%; height: 100%; display: block; }
.medal-text { font: 600 15.5px var(--mono); letter-spacing: 1px; }
.medal-sex { font: 700 60px var(--serif); }
.medal-spin { animation: spin 46s linear infinite; transform-origin: 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.medal.ghost { opacity: .13; }
.medal.ghost .medal-sex { display: none; }
.pic { width: 100%; height: 100%; object-fit: contain; display: block; }
.pic-plain { object-fit: cover; border-radius: inherit; }
.pic-cut { filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }

/* ---------------------------------------------------------------- sign in */
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; background: radial-gradient(90% 60% at 50% 12%, #27365c 0%, #111a30 48%, #090d18 100%); }
.login .flock { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-in { position: relative; display: grid; justify-items: center; gap: 14px; padding: 24px; width: min(350px, 100%); }
.login-medal { width: 108px; height: 108px; animation: floaty 5s ease-in-out infinite; }
.login h1 { text-align: center; }
.brand-name { font-size: 42px; background: linear-gradient(135deg, #fbe7a6, #e8b84a 55%, #f7dc8f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin-top: -8px; text-align: center; color: var(--text2); font-size: 15px; }
.pin-dots { display: flex; gap: 16px; margin: 8px 0 6px; }
.pin-dots i { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--gold); transition: background .15s, transform .15s var(--ease); }
.pin-dots i.on { background: var(--gold2); transform: scale(1.15); box-shadow: 0 0 14px rgba(247,220,143,.7); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-9px); } 50% { transform: translateX(9px); } 75% { transform: translateX(-5px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 13px; }
.keypad button { height: 76px; border-radius: 50%; font: 600 27px var(--sans); background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); transition: transform .12s, background .12s; }
.keypad button:active { transform: scale(.92); background: rgba(232,184,74,.3); }

/* ---------------------------------------------------------------- today */
.dusk { position: relative; overflow: hidden; padding: calc(58px + env(safe-area-inset-top)) 18px 20px; background: linear-gradient(180deg, #2b3c68 0%, #1c2745 45%, rgba(9,13,24,0) 100%); }
.dusk .flock { position: absolute; left: 0; top: 0; width: 100%; height: 240px; pointer-events: none; }
.dusk-in { position: relative; }
.when { font-weight: 600; color: var(--gold2); font-size: 14px; text-transform: capitalize; }
.loft-name { margin-top: 4px; color: var(--text2); font-weight: 600; font-size: 15px; }
.loft-name i { font-style: normal; opacity: .6; font-size: 13px; margin-left: 3px; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.counts a { background: rgba(9,13,24,.42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; padding: 11px 8px; text-align: center; }
.counts b { display: block; font: 800 28px/1 var(--serif); }
.counts span { font-size: 12px; color: var(--muted); font-weight: 600; }
.spot { margin: 12px 16px 0; }
.spot > a { position: relative; display: block; overflow: hidden; border-radius: 26px; border: 1px solid rgba(232,184,74,.32); background: radial-gradient(75% 65% at 56% 34%, #33466f 0%, #151d34 62%, #0d1324 100%); padding: 16px 18px 18px; min-height: 380px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.spot-tag { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: 2px; color: var(--gold2); }
.spot-bird { display: block; width: 88%; max-height: 270px; object-fit: contain; margin: 2px auto 8px; filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); }
.spot-eye { position: absolute; left: 16px; top: 44px; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: center; border: 2.5px solid var(--gold); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.spot-name { font: 800 29px/1.08 var(--serif); }
.spot-sub { color: var(--text2); font-size: 14px; margin-top: 3px; }
.spot-sub b { color: var(--gold2); }
.sec { padding: 22px 16px 0; }
.sec-h { font: 800 22px/1.15 var(--serif); margin-bottom: 8px; }
.sec-row { display: flex; justify-content: space-between; align-items: baseline; }
.see { color: var(--gold2); font-weight: 600; font-size: 14px; }
.tasks { display: grid; gap: 8px; margin-top: 4px; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 13px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: transform .15s var(--ease); }
.task:active { transform: scale(.98); }
.task.hot { border-color: rgba(232,184,74,.55); background: rgba(232,184,74,.1); }
.t-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; font-size: 20px; }
.t-main { flex: 1; min-width: 0; display: grid; }
.t-main b { font-weight: 650; font-size: 15px; line-height: 1.25; }
.t-main small { color: var(--muted); font-size: 13px; }
.chev { color: var(--muted); font-size: 22px; }

/* ---------------------------------------------------------------- bird cards */
.deck { display: flex; gap: 12px; overflow-x: auto; padding: 8px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.deck.in { padding: 6px 0; }
.bcard { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--line); background: var(--bg2); transition: transform .2s var(--ease); }
.bcard:active { transform: scale(.98); }
.deck .bcard { flex: none; width: 66vw; max-width: 270px; scroll-snap-align: center; }
.bc-glow { position: absolute; inset: 0; pointer-events: none; }
.bcard.s-M .bc-glow { background: radial-gradient(80% 55% at 50% 28%, rgba(91,156,240,.42), transparent 75%); }
.bcard.s-F .bc-glow { background: radial-gradient(80% 55% at 50% 28%, rgba(240,100,143,.38), transparent 75%); }
.bc-pic { position: relative; aspect-ratio: 1 / 1; padding: 13%; display: grid; place-items: center; }
.bc-pic .pic-cut { transform: scale(1.3); }
.bc-pic .pic-plain { border-radius: 14px; }
.bc-cta { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--gold2); background: rgba(9,13,24,.72); border: 1px dashed rgba(232,184,74,.6); border-radius: 999px; padding: 4px 11px; }
.bc-info { position: relative; padding: 2px 14px 14px; }
.bc-ring { font: 600 13px var(--mono); color: var(--gold2); }
.bc-name { font: 800 19px/1.15 var(--serif); margin-top: 1px; }
.bc-nums { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; font: 800 17px var(--serif); }
.bc-nums small { font: 500 11.5px var(--sans); color: var(--muted); margin-right: 8px; }
.bcard.gone { opacity: .55; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 2px 16px; }
.page-head { padding: calc(60px + env(safe-area-inset-top)) 16px 10px; }
.mini-counts { display: flex; gap: 14px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.mini-counts b { color: var(--text); }
.searchbar { padding: 4px 16px 10px; }

/* ---------------------------------------------------------------- bird page */
.hero { position: relative; height: 92vw; max-height: 470px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(180deg, #24335a 0%, #131b31 62%, rgba(9,13,24,0) 100%); }
.hero.s-F { background: linear-gradient(180deg, #4a2743 0%, #1c1730 62%, rgba(9,13,24,0) 100%); }
.hero-ring { position: absolute; width: 112%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.hero-pic { position: relative; width: 94%; height: 82%; object-fit: contain; margin-top: 16px; }
.hero-pic.cut { filter: drop-shadow(0 24px 30px rgba(0,0,0,.6)); }
.hero-pic.plain { width: 78%; height: 62%; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 50px rgba(0,0,0,.5); }
.hero-medal { position: relative; width: 58%; aspect-ratio: 1; margin-top: 24px; }
.hero-medal .bc-cta { top: auto; bottom: -6px; font-size: 13.5px; padding: 6px 14px; }
.hero-eye { position: absolute; left: 14px; bottom: 16px; width: 26vw; max-width: 116px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold); box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 0 5px rgba(232,184,74,.16); }
.hero-eye img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.12); }
.hero-cam { position: absolute; right: 14px; bottom: 16px; width: 50px; height: 50px; border-radius: 50%; font-size: 22px; background: rgba(9,13,24,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.title { padding: 6px 16px 0; }
.ring-big { font: 600 19px var(--mono); color: var(--gold2); letter-spacing: .4px; }
.name { font-size: 36px; margin-top: 2px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facts span { font-size: 13px; font-weight: 600; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; color: var(--text2); }
.facts .s-M { color: var(--sire); } .facts .s-F { color: var(--dam); }
.facts .pill-loft { color: var(--b-outcross); }
.facts .pill-bad { background: rgba(255,107,94,.2); color: #ffb0a8; border-color: rgba(255,107,94,.5); }
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 16px 0; }
.par { display: flex; align-items: center; gap: 9px; border-radius: 16px; padding: 9px; min-width: 0; border: 1px solid var(--line); }
.par.s { background: var(--sire-soft); } .par.d { background: var(--dam-soft); }
.par.none { display: grid; gap: 0; }
.par-pic { flex: none; width: 50px; height: 50px; display: block; border-radius: 12px; overflow: hidden; }
.par > span:last-child { min-width: 0; display: grid; }
.par small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.par b { font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.par i { font: 500 11px var(--mono); color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callout { margin: 12px 16px 0; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.callout.gold { background: rgba(232,184,74,.13); border-color: rgba(232,184,74,.6); }
.callout.warn { background: rgba(255,154,77,.1); border-color: rgba(255,154,77,.42); justify-content: flex-start; font-size: 14px; flex-wrap: nowrap; color: #ffd7b5; }
.callout.warn > b { background: var(--b-close); color: #1b1405; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.callout.flat { margin: 8px 0 10px; }

/* gauges */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 12px 0; }
.gbtn { display: block; width: 100%; text-align: center; }
.gauge { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 8px 4px 11px; }
.gauge svg { width: 100%; display: block; transform: translateY(2px); }
.g-track { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 11; stroke-linecap: round; }
.g-arc { fill: none; stroke-width: 11; stroke-linecap: round; stroke-dasharray: var(--v) 100; animation: gArc 1.5s var(--ease) both; }
@keyframes gArc { from { stroke-dasharray: 0 100; } }
.g-mark { stroke: rgba(9,13,24,.85); stroke-width: 2; }
.gs0 { stop-color: #4fd6c0; } .gs1 { stop-color: #ffd166; }
.gf.b-close .gs0, .gf.b-tight .gs0 { stop-color: #ffd166; } .gf.b-close .gs1 { stop-color: #ff9a4d; } .gf.b-tight .gs1 { stop-color: #ff6b5e; }
.gw .gs0 { stop-color: #d9a441; } .gw .gs1 { stop-color: #fbe7a6; }
.gk .gs0 { stop-color: #6aa8f7; } .gk .gs1 { stop-color: #9fe0ff; }
.g-num { position: absolute; left: 0; right: 0; top: 30%; text-align: center; }
.g-num b { font: 800 19px var(--serif); color: var(--text); }
.g-num small { font: 600 12px var(--sans); color: var(--muted); }
.g-label { font-size: 11.5px; font-weight: 700; color: var(--text2); margin-top: -8px; }
.g-word { font-size: 12px; font-weight: 700; min-height: 16px; }
.gf .g-word { color: inherit; } .gw .g-word { color: var(--gold2); }
.gauges:has(.gbtn:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }

.actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; padding: 12px 12px 4px; }
.actions .btn { padding: 0 6px; font-size: 14px; }
.actions .btn.toggle { grid-column: span 1; font-size: 12.5px; }
.actions .btn:nth-child(4) { grid-column: 1 / span 2; }
.tabs-in { position: sticky; top: calc(8px + env(safe-area-inset-top)); z-index: 15; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 12px 62px 4px 62px; padding: 3px; background: rgba(16,23,41,.85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 560px) { .tabs-in { position: relative; top: 0; margin: 12px 12px 4px; } }
.tabs-in button { padding: 9px 0; font-size: 13px; font-weight: 650; color: var(--muted); border-radius: 11px; transition: background .2s, color .2s; }
.tabs-in button.on { background: var(--text); color: #0b1020; }
.glass { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 15px; }
.mx { margin: 11px 12px 0; }
.glass h3 { font: 800 19px var(--serif); margin-bottom: 9px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.card-head h3 { margin: 0; }
.notes { white-space: pre-wrap; font-size: 15px; }

/* ---------------------------------------------------------------- the sunburst */
.map-sec { padding: 12px 8px 0; }
.sb-wrap { position: relative; max-width: 560px; margin: 8px auto 0; }
.sb { width: 100%; display: block; overflow: visible; }
.sb-seg { stroke: #090d18; stroke-width: 1.5; transform-origin: 0 0; animation: sbIn .7s var(--ease) both; animation-delay: var(--d); transition: opacity .25s, filter .25s; cursor: pointer; }
.sb-none { fill: rgba(255,255,255,.035); cursor: default; }
@keyframes sbIn { from { opacity: 0; transform: scale(.72) rotate(-14deg); } to { opacity: 1; transform: none; } }
.sb-rep { animation: sbIn .7s var(--ease) both, repGlow 2.6s ease-in-out infinite 1.4s; animation-delay: var(--d), calc(var(--d) + 1.2s); }
@keyframes repGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3) drop-shadow(0 0 7px rgba(255,255,255,.3)); } }
.sb-star { fill: none; stroke: #fbe7a6; stroke-width: 4.5; stroke-linecap: round; pointer-events: none; animation: fadeIn .6s both; animation-delay: var(--d); }
.sb-label { fill: #fff; font-family: var(--sans); font-weight: 650; pointer-events: none; animation: fadeIn .5s both; animation-delay: var(--d); paint-order: stroke; stroke: rgba(0,0,0,.28); stroke-width: 2px; }
.sb-label.on-rep { fill: #10131f; stroke: none; font-weight: 750; }
@keyframes fadeIn { from { opacity: 0; } }
.sb-disc { stroke: #d9a441; stroke-width: 3; }
.sb-centre { animation: pop .8s var(--ease) both; transform-origin: 0 0; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.sb-sex { font: 800 92px var(--serif); fill: var(--gold2); }
.sb-egg { fill: #f4ead0; stroke: #d9a441; stroke-width: 3; }
.sb-pulse { fill: none; stroke: rgba(247,220,143,.5); stroke-width: 2; vector-effect: non-scaling-stroke; transform-origin: 0 0; animation: pulseOut 5.2s ease-out infinite 1.8s; opacity: 0; pointer-events: none; }
.sb-pulse.p2 { animation-delay: 4.4s; }
@keyframes pulseOut { 0% { transform: scale(1); opacity: .75; } 70% { opacity: .12; } 100% { transform: scale(4.25); opacity: 0; } }
.sb.picking .sb-seg { opacity: .16; animation: none; }
.sb.picking .sb-seg.trail { opacity: .62; }
.sb.picking .sb-seg.on { opacity: 1; filter: brightness(1.18) drop-shadow(0 0 12px rgba(247,220,143,.85)); }
.sb.picking .sb-label { opacity: .3; animation: none; }
.sb.picking .sb-star { opacity: .3; animation: none; }
.sb-side { position: absolute; top: -2px; font-size: 11.5px; font-weight: 700; }
.sb-side.l { left: 2px; color: var(--sire); } .sb-side.r { right: 2px; color: var(--dam); }
.pick { display: flex; align-items: center; gap: 12px; margin: 10px 8px 0; padding: 11px 13px; background: rgba(232,184,74,.11); border: 1px solid rgba(232,184,74,.55); border-radius: 18px; animation: rise .35s var(--ease) both; }
.pick-pic { flex: none; width: 54px; height: 54px; border-radius: 13px; overflow: hidden; display: block; }
.pick-main { flex: 1; min-width: 0; display: grid; }
.pick-main b { font-size: 17px; line-height: 1.2; }
.pick-main i { font: 500 12px var(--mono); font-style: normal; color: var(--gold2); }
.pick-main small { color: var(--text2); font-size: 12.5px; }
.pick-val { text-align: right; display: grid; }
.pick-val b { font: 800 27px/1 var(--serif); color: var(--gold2); }
.pick-val small { font-size: 11px; color: var(--muted); }
.rep-h { font-weight: 700; font-size: 13px; color: var(--text2); margin: 14px 8px 6px; }
.rep-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 8px; }
.rep-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; }
.rep-chip i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.rep-chip b { color: var(--gold2); }

/* ---------------------------------------------------------------- rows */
.bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--text2); animation: barIn 1.1s var(--ease) both; }
@keyframes barIn { from { width: 0; } }
.bar.gold i { background: linear-gradient(90deg, #d9a441, #fbe7a6); }
.bar.twice i { background: #e8b84a; } .bar.both i { background: #ff9a4d; }
.blood, .stambars, .sources, .races, .prizes { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.blood li.extra { display: none; } .blood.all li.extra { display: block; }
.blood li a, .stambars li a { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-radius: 12px; }
.br-pic { flex: none; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; display: block; background: rgba(255,255,255,.04); }
.br-pic.big { width: 54px; height: 54px; }
.br-main { flex: 1; min-width: 0; display: grid; }
.br-name { font-weight: 650; font-size: 15px; line-height: 1.25; }
.br-ring { font: 500 11.5px var(--mono); color: var(--muted); }
.br-val { font: 800 18px var(--serif); }
.stambars li.zero { opacity: .45; }
.more { margin-top: 8px; font-weight: 600; }
.sources li { padding: 10px 0; border-top: 1px solid var(--line); }
.sources li:first-child { border-top: 0; padding-top: 0; }
.src-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; }
.src-head a { display: flex; align-items: center; gap: 9px; }
.src-val { margin-left: auto; font: 800 17px var(--serif); color: var(--b-close); }
.src-line { display: grid; gap: 4px; margin-top: 7px; }
.side { font-size: 13.5px; padding: 6px 10px; border-radius: 11px; line-height: 1.6; }
.side.s { background: var(--sire-soft); } .side.d { background: var(--dam-soft); }
.side small { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.side i { font-style: normal; color: var(--muted); margin: 0 5px; }
.races li { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.medal-pos { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 16px var(--serif); background: var(--card2); }
.medal-pos.p1 { background: linear-gradient(145deg, #fbe7a6, #d9a441); color: #1b1405; }
.medal-pos.p2 { background: linear-gradient(145deg, #eef1f5, #a7afbb); color: #111; }
.medal-pos.p3 { background: linear-gradient(145deg, #eab98b, #a86a33); color: #1b1405; }
.races small { color: var(--muted); font-size: 12.5px; }
.prizes li { font-size: 14.5px; padding: 3px 0; color: var(--text2); }

/* ---------------------------------------------------------------- tree */
.tree-scroll { overflow-x: auto; margin: 0 -15px; padding: 2px 15px 6px; scrollbar-width: none; }
.tree { display: grid; grid-template-columns: 158px 142px 132px 126px; grid-template-rows: repeat(16, minmax(46px, auto)); column-gap: 14px; row-gap: 3px; width: max-content; }
.tc { position: relative; display: flex; align-items: center; min-width: 0; }
.tn { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 11px; padding: 5px 8px; border-left-width: 3px; }
.side-s .tn { border-left-color: var(--sire); } .side-d .tn { border-left-color: var(--dam); }
.tn-t { min-width: 0; display: grid; }
.tn-pic { flex: none; width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.tn-pic:not(.cut) { object-fit: cover; }
.tn-ring { font: 500 10.5px var(--mono); color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-name { font-weight: 650; font-size: 12.5px; line-height: 1.2; }
.tn.g1 .tn-name { font: 800 15.5px var(--serif); }
.tn-notes { font-size: 10.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tn-rep { background: color-mix(in srgb, var(--rep) 24%, transparent); border-color: var(--rep); box-shadow: 0 0 12px color-mix(in srgb, var(--rep) 34%, transparent); }
.tn-star .tn-name .star { font-size: 11.5px; }
.tn-empty { height: 26px; border: 1px dashed rgba(255,255,255,.1); background: none; border-radius: 9px; opacity: .6; }
.tn-add { justify-content: flex-start; color: var(--gold2); border: 1px dashed rgba(232,184,74,.6); background: rgba(232,184,74,.1); font-weight: 650; font-size: 13px; }
.tc.kids::after { content: ""; position: absolute; left: 100%; top: 25%; bottom: 25%; width: 7px; margin-left: 7px; border-left: 1.5px solid rgba(232,184,74,.42); }
.tc.kids > .tn::after { content: ""; position: absolute; left: 100%; top: 50%; width: 7px; border-top: 1.5px solid rgba(232,184,74,.42); }
.tc:not([style*="grid-column:1"])::before { content: ""; position: absolute; right: 100%; top: 50%; width: 7px; border-top: 1.5px solid rgba(232,184,74,.42); }
.swipe { margin-top: 6px; }

/* ---------------------------------------------------------------- album & studio */
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.al { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.05); }
.al.cut { background: radial-gradient(80% 70% at 50% 40%, #2c3d65, #111931); }
.al img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al.cut img { object-fit: contain; padding: 5px; }
.al.eye { border-radius: 50%; }
.al em { position: absolute; right: 6px; top: 4px; font-style: normal; color: var(--gold2); }
.ph-view { border-radius: 18px; overflow: hidden; margin: 8px 0; text-align: center; }
.ph-view.cut { background: radial-gradient(80% 70% at 50% 40%, #2c3d65, #111931); }
.ph-view img { max-width: 100%; max-height: 58vh; display: inline-block; }
.ph-view.eye { width: min(320px, 82vw); aspect-ratio: 1; margin: 8px auto; border-radius: 50%; border: 4px solid var(--gold); }
.ph-view.eye img { width: 100%; height: 100%; max-height: none; object-fit: cover; transform: scale(1.1); }
.pk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.pk:first-of-type { border-top: 0; }
.pk .t-main { flex: 1 1 60%; }
.pk-btns { display: flex; gap: 7px; width: 100%; }
.pk-btns label { flex: 1; cursor: pointer; }
.studio { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; display: grid; place-items: center; margin-top: 8px; }
.studio img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.st-before { transition: opacity 1s, filter 1s, transform 1s; }
.st-after { opacity: 0; transform: scale(.96); transition: opacity 1s .25s, transform 1.1s var(--ease) .25s; filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); }
.st-scan { position: absolute; left: 0; right: 0; height: 26%; background: linear-gradient(180deg, transparent, rgba(247,220,143,.55) 92%, #fbe7a6); mix-blend-mode: screen; animation: scan 1.7s ease-in-out infinite alternate; z-index: 2; }
@keyframes scan { from { top: -26%; } to { top: 100%; } }
.studio.lifted { background: radial-gradient(75% 70% at 50% 42%, #33466f, #0f1629); }
.studio.lifted .st-before { opacity: 0; filter: blur(8px); }
.studio.lifted .st-after { opacity: 1; transform: none; }
.studio.lifted .st-scan { display: none; }
.st-msg { font: 700 18px var(--serif); margin-top: 12px; color: var(--gold2); }
.crop { position: relative; width: min(320px, 82vw); aspect-ratio: 1; margin: 6px auto; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold); touch-action: none; background: #000; }
.crop img { position: absolute; left: 0; top: 0; transform-origin: center; user-select: none; -webkit-user-drag: none; max-width: none; }
.zoomer { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text2); margin: 10px 0; }

/* ---------------------------------------------------------------- nest */
.seg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 10px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; }
.seg a { padding: 7px 22px; font-weight: 650; font-size: 14.5px; border-radius: 10px; color: var(--muted); text-align: center; }
.seg a.on { background: var(--text); color: #0b1020; }
.deck-h { padding: 12px 16px 2px; font-size: 14px; }
.deck-h.s b { color: var(--sire); } .deck-h.d b { color: var(--dam); }
.pdeck { display: flex; gap: 9px; overflow-x: auto; padding: 6px 16px; scrollbar-width: none; }
.pcard { flex: none; width: 118px; display: grid; justify-items: center; gap: 1px; padding: 9px 7px; border-radius: 17px; border: 1.5px solid var(--line); background: var(--card); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.pcard.s-M.on { border-color: var(--sire); box-shadow: 0 0 22px rgba(91,156,240,.5); transform: translateY(-2px); }
.pcard.s-F.on { border-color: var(--dam); box-shadow: 0 0 22px rgba(240,100,143,.5); transform: translateY(-2px); }
.pc-pic { width: 76px; height: 76px; display: block; border-radius: 12px; overflow: hidden; }
.pc-ring { font: 500 10.5px var(--mono); color: var(--gold2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pc-name { font-weight: 650; font-size: 13px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.whatif { display: flex; align-items: center; gap: 9px; padding: 8px 16px 2px; font-size: 14px; color: var(--text2); }
.stage { position: relative; margin: 12px 16px 0; padding: 12px 12px 14px; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(70% 70% at 50% 40%, #233158, #0f1629); overflow: hidden; }
.st-svg { width: 100%; display: block; }
.st-bird { position: absolute; top: 8.5%; width: 25%; aspect-ratio: 1; z-index: 2; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: rgba(9,13,24,.55); display: grid; place-items: center; transition: transform .6s var(--ease); }
.st-bird.l { left: 3.5%; border-color: var(--sire); } .st-bird.r { right: 3.5%; border-color: var(--dam); }
.st-q { font: 800 32px var(--serif); color: var(--muted); }
.strand { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.strand.a { stroke: var(--sire); filter: drop-shadow(0 0 6px var(--sire)); } .strand.b { stroke: var(--dam); filter: drop-shadow(0 0 6px var(--dam)); }
.egg { fill: #f4ead0; stroke: #d9a441; stroke-width: 2; opacity: .35; transition: opacity .3s; }
.stage.ready .egg { opacity: 1; }
.egg-g { transform-origin: 180px 92px; }
.crack { fill: none; stroke: #5c3d0d; stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.burst { opacity: 0; transform-origin: 180px 92px; }
.burst line { stroke: #fbe7a6; stroke-width: 3.5; stroke-linecap: round; }
.pair-go { margin-top: 8px; }
.stage.run .strand { animation: draw 1s ease-in-out both; }
.stage.run .strand.b { animation-delay: .1s; }
.stage.run .egg-g { animation: wobble .75s ease-in-out .95s both; }
.stage.run .crack { animation: draw .32s linear 1.5s both; }
.stage.run .burst { animation: burst .7s var(--ease) 1.78s both; }
.stage.run .egg { animation: eggGlow 1.4s ease-in-out 1s both; }
.stage.run .st-bird.l { transform: translateX(5%); } .stage.run .st-bird.r { transform: translateX(-5%); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 45% { transform: rotate(6deg); } 70% { transform: rotate(-4deg); } 88% { transform: rotate(2deg); } }
@keyframes burst { 0% { opacity: 1; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.55); } }
@keyframes eggGlow { 50%, 100% { filter: drop-shadow(0 0 16px #fbe7a6); } }
.yg { padding: 18px 4px 0; animation: rise .6s var(--ease) both; }
.yg-t { padding: 0 12px; font-size: 27px; text-align: center; background: linear-gradient(135deg, #fbe7a6, #e8b84a); -webkit-background-clip: text; background-clip: text; color: transparent; }
#ysb { padding: 8px; }
.save-nest { display: grid; gap: 10px; }
.save-nest label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text2); }
.task.bp.first { border-color: rgba(232,184,74,.6); }
.bp-pics { flex: none; display: flex; }
.bp-pics > span { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: block; border: 1.5px solid var(--line); background: var(--bg2); }
.bp-pics > span + span { margin-left: -12px; }
.pn { display: grid; gap: 1px; text-align: right; font: 800 16px var(--serif); }
.nest { margin: 10px 16px 0; }
.nest.closed { opacity: .6; }
.nest-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.np { display: flex; align-items: center; gap: 9px; min-width: 0; }
.np > span { flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: block; }
.np b { font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.x { font: 700 18px var(--serif); color: var(--muted); }
.nest-stage { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 10px; }
.nest-due { font-size: 15px; } .nest-due.hot { color: var(--gold2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.step { position: relative; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.step i { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--bg2); border: 2px solid var(--line); }
.step + .step::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.step.did { color: var(--text2); } .step.did i { background: var(--gold); border-color: var(--gold); }
.step.did + .step::before, .step.did + .step.now::before { background: var(--gold); }
.step.now { color: var(--gold2); } .step.now i { border-color: var(--gold2); box-shadow: 0 0 0 4px rgba(247,220,143,.2); animation: nowPulse 1.8s ease-in-out infinite; }
@keyframes nowPulse { 50% { box-shadow: 0 0 0 7px rgba(247,220,143,.08); } }

/* ---------------------------------------------------------------- blood page */
.champ { flex: none; width: 74vw; max-width: 300px; scroll-snap-align: center; overflow: hidden; border-radius: 22px; border: 1px solid rgba(232,184,74,.28); background: linear-gradient(170deg, #1d2845, #0e1425); }
.ch-pic { height: 200px; padding: 12px; display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 40%, rgba(232,184,74,.22), transparent 75%); }
.ch-pic .medal { width: 62%; }
.ch-pic .pic { max-height: 176px; }
.ch-info { padding: 2px 14px 14px; }
.ch-firsts { color: var(--text2); font-size: 14px; margin-top: 4px; }
.ch-firsts b { font: 800 22px var(--serif); color: var(--gold2); }
.ch-prize { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ch-carry { font-size: 13px; color: var(--text2); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.ch-carry b { color: var(--gold2); }
.matrix-wrap { overflow-x: auto; padding: 8px; margin-top: 6px; scrollbar-width: none; }
.matrix { border-collapse: separate; border-spacing: 3px; font-size: 12.5px; }
.matrix thead th { height: 112px; min-width: 42px; vertical-align: bottom; padding: 0 0 5px; font-weight: 600; }
.matrix thead th a { display: block; width: 42px; }
.matrix thead th span { display: block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; margin: 0 auto; max-height: 104px; overflow: hidden; text-overflow: ellipsis; color: var(--text2); }
.matrix tbody th { text-align: left; font-weight: 650; white-space: nowrap; padding-right: 7px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.matrix td { min-width: 42px; height: 38px; text-align: center; border-radius: 8px; font-weight: 700; font-size: 11px; background: color-mix(in srgb, #e8b84a calc(var(--a) * 100%), rgba(255,255,255,.04)); color: var(--text); }
.stam-c { margin-top: 9px; }
.stam-h { display: flex; align-items: center; gap: 11px; min-width: 0; }
.stam-h > span:last-child { display: grid; min-width: 0; }
.stam-h small { font: 500 12px var(--mono); color: var(--muted); }
.sc-count { text-align: right; }
.sc-count b { font: 800 27px/1 var(--serif); color: var(--gold2); display: block; }
.sc-count small { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- add */
.add-card { display: flex; gap: 14px; align-items: flex-start; margin: 10px 16px 0; padding: 18px; background: var(--card); border-radius: 20px; border: 1px solid var(--line); text-align: left; width: calc(100% - 32px); cursor: pointer; }
.add-card.primary-card { border-color: rgba(232,184,74,.6); background: linear-gradient(160deg, rgba(232,184,74,.17), rgba(232,184,74,.04)); }
.add-card h2 { font: 800 19px/1.2 var(--serif); }
.add-card p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.add-card.soon { opacity: .55; cursor: default; }
.ac-icon { flex: none; width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(145deg, #fbe7a6, #d9a441); color: #1b1405; display: grid; place-items: center; font: 800 15px var(--sans); }
.spin { width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--gold2); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }

/* ---------------------------------------------------------------- share */
.share-qr { display: grid; justify-items: center; gap: 5px; margin-bottom: 8px; }
.qr { width: 136px; height: 136px; border-radius: 12px; }
.share-qr small { color: var(--muted); font-size: 12.5px; }
.share-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; margin-top: 7px; }

/* ---------------------------------------------------------------- drawer & toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(4,6,12,0); display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sheet-wrap.open { background: rgba(4,6,12,.66); }
.sheet { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; background: #141b30; border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .24s var(--ease); }
.sheet-wrap.open .sheet { transform: none; }
.sheet h2 { font: 800 22px/1.15 var(--serif); margin: 6px 0 12px; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); margin: 0 auto 8px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; width: max-content; max-width: min(92vw, 520px); background: var(--text); color: #0b1020; padding: 12px 16px; border-radius: 15px; font-weight: 650; font-size: 14.5px; box-shadow: 0 12px 34px rgba(0,0,0,.5); animation: rise .3s var(--ease); }
.toast.bad { background: var(--b-tight); color: #fff; }

/* ---------------------------------------------------------------- public pedigree */
.pub-top { padding: 12px 16px 0; }
.stolen { margin: 12px 16px 0; padding: 14px; border-radius: 16px; background: rgba(255,107,94,.18); border: 1.5px solid var(--b-tight); color: #ffd3ce; font-weight: 700; }
.pub-foot { text-align: center; padding: 26px 16px 40px; color: var(--muted); font-size: 13px; }

@media (min-width: 700px) {
  .deck .bcard { width: 240px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .hero { height: 460px; }
  .hero-eye { max-width: 130px; }
  .tree { grid-template-columns: 178px 158px 146px 136px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
