.demo { display: flex; justify-content: center; align-items: center; gap: 72px; margin: 16px 0 24px; }
.demo .phone { margin: 0; flex: none; }
.demohint { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 104px; }
.demo:has(+ .demohint[hidden]) { margin-bottom: 112px; }

.screen { aspect-ratio: 402 / 874; background: #000; }
.screen .still { width: 100%; }
.app { position: absolute; inset: 0 auto auto 0; width: 402px; height: 874px; transform-origin: 0 0; transform: scale(var(--k, 0.79)); overflow: hidden; background: #000; color: #fff; font: 15px/1.25 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; letter-spacing: -0.01em; -webkit-user-select: none; user-select: none; --acc: #ffbd4a; --sec: rgba(235, 235, 245, 0.6); --ter: rgba(235, 235, 245, 0.3); --card: rgba(255, 255, 255, 0.06); }
.app[hidden] { display: none; }
.app button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
.screen::after { z-index: 5; }
.ico { display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.i-cell { --m: url(/demo/cell.png); width: 19px; height: 12px; }
.i-wifi { --m: url(/demo/wifi.png); width: 17px; height: 12px; }
.i-batt { --m: url(/demo/battery.png); width: 28px; height: 13px; }
.i-bandbatt { --m: url(/demo/bandbattery.png); width: 22px; height: 11px; }
.i-person { --m: url(/demo/person.png); width: 22px; height: 22px; }
.i-chev { --m: url(/demo/chevron.png); width: 8px; height: 12px; }
.i-paw { --m: url(/demo/paw.png); width: 19px; height: 17px; }

.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 6px 36px 0 56px; font: 600 17px/1 -apple-system, system-ui, sans-serif; letter-spacing: -0.02em; }
.statusbar .sys { display: flex; gap: 6px; align-items: center; }

.main { position: absolute; inset: 0; padding: 70px 20px 40px; display: flex; flex-direction: column; gap: 28px; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s; }
.app.pushed .main { transform: translateX(-30%); filter: brightness(0.6); }

.top { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sec); height: 28px; }
.top .name { color: #fff; font-weight: 600; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.conn, .bb { display: flex; align-items: center; gap: 5px; }
.bb { gap: 4px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #30d158; }
.app .profile { color: var(--sec); display: flex; opacity: 0.45; }
.app .profile:disabled { cursor: default; }

.app .logo, .hero-logo .ht { position: relative; width: 28px; height: 28px; border-radius: 8px; border: 0.8px solid transparent; background: linear-gradient(135deg, rgb(245, 204, 92) 0%, rgb(209, 148, 26) 34%, rgb(133, 84, 8) 64%, rgb(199, 140, 33) 86%, rgb(117, 74, 8) 100%) padding-box, linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.25)) border-box, linear-gradient(135deg, rgb(245, 204, 92), rgb(117, 74, 8)) border-box; box-shadow: 0 2px 6px rgba(204, 140, 26, 0.3); }
.hero-logo { --u: 3.43; position: relative; display: block; width: 96px; height: 96px; margin: 0 auto 32px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero-logo .ht { position: absolute; inset: 0; width: auto; height: auto; border-radius: 27px; border-width: 2.7px; box-shadow: 0 10px 40px rgba(255, 189, 74, 0.18); }
.hero-logo .dog { width: 77.8px; height: 63.8px; margin: -31.9px 0 0 -38.9px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.22)); }
.hero-logo .shine { position: absolute; inset: 0; border-radius: 27px; overflow: hidden; pointer-events: none; }
.hero-logo .shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 60%; background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 80%, transparent 100%); transform: translateX(-130%) skewX(-12deg); }
.hero-logo.shining .shine::before { animation: sweep 0.9s cubic-bezier(0.45, 0, 0.3, 1); }
@keyframes sweep { to { transform: translateX(260%) skewX(-12deg); } }
.dog { position: absolute; left: 50%; top: 50%; width: 22.7px; height: 18.6px; margin: -9.3px 0 0 -11.35px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22)); }
.dog span, .dog img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lift, .squash { transform-origin: 50% 100%; }
.p-tail { transform-origin: 22.5% 37%; }
.p-front { transform-origin: 60% 64%; }
.p-head { transform-origin: 70% 30%; }
.p-ear { transform-origin: 70% 22%; }
.hop .lift { animation: lift 1.4s; }
.hop .squash { animation: squash 1.4s; }
.hop .p-tail { animation: tail 1.4s; }
.hop .p-front { animation: front 1.4s; }
.hop .p-head { animation: head 1.4s; }
.hop .p-ear { animation: ear 1.4s; }
@keyframes lift { 0%, 8.6% { transform: none; animation-timing-function: cubic-bezier(0.3, 0, 0.4, 1); } 22.9% { transform: translateY(calc(var(--u, 1) * -9px)); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 1); } 33.6%, 51.4% { transform: none; } 58.6% { transform: translateY(calc(var(--u, 1) * -3.5px)); } 65.7%, 100% { transform: none; } }
@keyframes squash { 0% { transform: none; } 8.6% { transform: scale(1.22, 0.78); } 15.7% { transform: scale(0.86, 1.14); } 28.6% { transform: none; } 33.6% { transform: scale(1.16, 0.84); } 51.4% { transform: none; } 57.1% { transform: scale(0.94, 1.06); } 64.3% { transform: none; } 67.9% { transform: scale(1.08, 0.92); } 89%, 100% { transform: none; } }
@keyframes tail { 0% { transform: none; } 5%, 15%, 25%, 35%, 45%, 55% { transform: rotate(26deg); } 10%, 20%, 30%, 40%, 50%, 60% { transform: rotate(-18deg); } 78%, 100% { transform: none; } }
@keyframes ear { 0%, 8.6% { transform: none; } 21.4%, 30% { transform: rotate(-24deg); } 62%, 100% { transform: none; } }
@keyframes head { 0%, 8.6% { transform: none; } 22.9% { transform: rotate(-8deg); } 51.4%, 72.9% { transform: none; } 90.7% { transform: rotate(-6deg); } 100% { transform: none; } }
@keyframes front { 0%, 10% { transform: none; } 21.4% { transform: rotate(-26deg); } 39.3%, 100% { transform: none; } }

.ahero { position: relative; display: flex; flex-direction: column; gap: 6px; touch-action: pan-y; cursor: grab; }
.ahero:active { cursor: grabbing; }
.day { font-weight: 500; color: var(--sec); transition: opacity 0.2s; }
.count { display: flex; align-items: baseline; gap: 10px; text-align: left; }
.count:disabled { cursor: inherit; }
.num { font: 600 84px/1 ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; display: inline-block; }
.num.up { animation: up 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.num.down { animation: down 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes up { from { transform: translateY(28px); opacity: 0; } }
@keyframes down { from { transform: translateY(-28px); opacity: 0; } }
.unit { font-size: 20px; color: var(--sec); }
.menu { position: absolute; top: 118px; left: 0; z-index: 6; width: 250px; padding: 6px; border-radius: 22px; background: rgba(58, 58, 62, 0.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); transform-origin: 20% 0; animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
.menu[hidden] { display: none; }
.app .menu button { display: block; width: 100%; text-align: left; padding: 11px 14px; border-radius: 16px; color: #ff453a; font-size: 17px; }
.app .menu button:hover { background: rgba(255, 255, 255, 0.08); }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.paws { display: flex; gap: 12px; padding-top: 6px; }
.paws .g { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.paws .row { display: flex; gap: 7px; }
.paws .i-paw { color: rgba(255, 255, 255, 0.13); transition: color 0.2s; }
.paws .i-paw:nth-child(odd) { transform: rotate(-12deg); }
.paws .i-paw:nth-child(even) { transform: rotate(12deg); }
.paws .on { color: var(--acc); }
.paws .bounce { animation: bounce 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes bounce { 0% { scale: 1; } 40% { scale: 1.35; } 100% { scale: 1; } }
.paws .lv { font-size: 13px; color: var(--ter); }
.paws .lv.cur { color: var(--acc); font-weight: 600; }
.next { font-size: 15px; color: var(--sec); padding-top: 4px; }
.next:empty { display: none; }

.seg { position: relative; display: flex; height: 36px; padding: 2px; border-radius: 18px; background: rgba(118, 118, 128, 0.24); }
.seg button { position: relative; z-index: 1; flex: 1; font-size: 14px; font-weight: 500; }
.seg .thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 16px; background: rgba(255, 255, 255, 0.24); transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.3, 1.1); }
.seg.month .thumb { transform: translateX(100%); }

.card { background: var(--card); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chead { display: flex; align-items: baseline; gap: 6px; font-size: 15px; color: var(--sec); }
.chead .sp { flex: 1; }
.chead .acc { color: var(--acc); font-variant-numeric: tabular-nums; }
.chead b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.plot { position: relative; height: 172px; margin-right: 0; cursor: pointer; }
.grid { position: absolute; inset: 0; }
.grid .gl { position: absolute; left: 0; right: 30px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.grid .gl span { position: absolute; right: -30px; width: 24px; transform: translateY(-50%); font-size: 11px; color: var(--sec); text-align: left; }
.bars { position: absolute; inset: 0 30px 0 0; display: flex; align-items: flex-end; }
.bars .slot { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bars .b { width: 70%; background: rgba(255, 255, 255, 0.14); border-radius: 6px 6px 0 0; transition: height 0.35s cubic-bezier(0.3, 0.9, 0.3, 1), background-color 0.2s; }
.bars.month .b { width: 62%; border-radius: 3px 3px 0 0; }
.bars .b.hi { background: var(--acc); }
.avg { position: absolute; left: 0; right: 30px; border-top: 1px dashed rgba(255, 189, 74, 0.7); transition: bottom 0.35s; pointer-events: none; }
.avg[hidden] { display: none; }
.xl { position: relative; display: flex; margin: -6px 30px 0 0; font-size: 11px; color: var(--sec); height: 14px; }
.xl span { flex: 1; text-align: center; }
.xl.month span { text-align: left; white-space: nowrap; overflow: visible; }
.edit { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--sec); text-align: left; }
.edit[hidden] { display: none; }

.stats { display: flex; gap: 12px; }
.stat { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--card); }
.st { font-size: 12px; color: var(--sec); }
.sv { font: 600 22px/1.2 ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.sv.acc { color: var(--acc); }
.sv.down { color: #ff7373; }
.su { font-size: 11px; color: var(--ter); }

.dayview { position: absolute; inset: 0; z-index: 2; background: #000; padding: 62px 16px 30px; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); }
.app.pushed .dayview { transform: none; }
.nav { display: flex; align-items: center; height: 52px; }
.app .back, .app .editbtn { height: 44px; border-radius: 22px; background: rgba(120, 120, 128, 0.32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.back { width: 44px; display: grid; place-items: center; }
.back .i-chev { transform: scaleX(-1); width: 11px; height: 17px; }
.editbtn { padding: 0 16px; font-size: 17px; }
.nav .title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.list { list-style: none; margin: 18px 0 0; padding: 0; border-radius: 26px; background: #1c1c1e; overflow: hidden; }
.list:empty { display: none; }
.list li { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px; font-size: 17px; font-variant-numeric: tabular-nums; border-bottom: 0.5px solid rgba(84, 84, 88, 0.65); transition: opacity 0.25s, height 0.25s; overflow: hidden; }
.list li:last-child { border-bottom: 0; }
.list li.gone { opacity: 0; height: 0; }
.app .list .minus { display: none; width: 22px; height: 22px; border-radius: 50%; background: #ff453a; position: relative; flex: none; }
.list .minus::after { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; border-radius: 1px; background: #fff; }
.editing .app .list .minus { display: block; }
.empty { text-align: center; color: var(--sec); font-size: 17px; margin-top: 280px; }

.bandside { flex: none; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bandside[hidden] { display: none; }
.band { position: relative; width: 220px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.band img { display: block; width: 100%; mix-blend-mode: lighten; transition: transform 0.12s; }
.band:active img, .band.pressed img { transform: scale(0.98); }
.band.buzz img { animation: buzz 0.32s linear; }
.band .pulse { position: absolute; left: 64%; top: 20.7%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; pointer-events: none; }
.band:hover .pulse { opacity: 0.4; }
.band:not(.used) .pulse { animation: idle 2.4s ease-out 0.8s infinite; }
.band.pressed .pulse { animation: ring 0.6s ease-out; }
@keyframes idle { 0% { opacity: 0.9; transform: scale(0.7); } 30%, 100% { opacity: 0; transform: scale(2.4); } }
@keyframes ring { from { opacity: 0.9; transform: scale(0.7); } to { opacity: 0; transform: scale(2.2); } }
@keyframes buzz { 0%, 100% { transform: none; } 10%, 30%, 50%, 70%, 90% { transform: translateX(-1.6px); } 20%, 40%, 60%, 80% { transform: translateX(1.6px); } }
.bandhint { margin: 0; color: var(--text); font-size: 15px; font-weight: 500; }

@media (max-width: 720px) {
  .demo { flex-direction: column-reverse; gap: 28px; }
  .demo { gap: 20px; }
  .bandside { gap: 6px; }
  .band { width: 100px; }
  .demohint { margin-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .hop *, .hero-logo.shining .shine::before, .num, .paws .bounce, .band.buzz img, .band.pressed .pulse, .band .pulse, .menu { animation: none !important; }
}
