:root{color-scheme:light;--ink:#092f56;--muted:#49667d;--paper:#fcf5ed;--paper-warm:#f4e6d2;--surface:#ffffff;--line:#d9e1e5;--brand:#123c55;--accent:#d9a02f;--blue:#69b8da;--shadow:0 28px 80px rgba(16,49,76,0.18)}*{box-sizing:border-box}html{min-height:100%}body,html{background:var(--paper)}body{min-height:100vh;margin:0;color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;letter-spacing:0}button,input{font:inherit}button{cursor:pointer}.app-shell{width:100%;min-height:100vh;margin:0 auto}.counter-screen,.home-screen{display:none}.counter-screen.active,.home-screen.active{display:block}.home-screen{min-height:100vh;padding:clamp(1rem,3vw,2.5rem)}.hero{width:min(100%,1120px);min-height:calc(100vh - clamp(2rem, 6vw, 5rem));margin:0 auto;display:grid;grid-template-columns:minmax(260px,.8fr) minmax(280px,1fr);align-items:center;grid-gap:clamp(2rem,6vw,5rem);gap:clamp(2rem,6vw,5rem)}.art-wrap{width:min(100%,430px);justify-self:center;overflow:hidden;border-radius:8px;background:var(--paper);box-shadow:var(--shadow)}.brand-art{display:block;width:100%;height:auto}.intro{max-width:520px}.eyebrow{margin:0 0 .7rem;color:var(--accent);font-size:.78rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase}h1,h2,p{margin-top:0}h1{font-family:Georgia,Times New Roman,serif;font-size:clamp(3rem,8vw,6.8rem);line-height:.92}h1,h2{margin-bottom:0}h2{font-size:1.1rem}.lede{max-width:28rem;margin:clamp(1.1rem,3vw,1.8rem) 0 1.7rem;color:var(--muted);font-size:clamp(1.05rem,2vw,1.28rem);line-height:1.55}.category-add,.category-subtract,.icon-button,.primary-button,.secondary-button,.sound-toggle{min-width:44px;min-height:44px;border:0;border-radius:8px;font-weight:850}.primary-button{display:inline-flex;align-items:center;justify-content:center;min-height:3.35rem;padding:.95rem 1.25rem;color:#ffffff;background:var(--brand);box-shadow:0 12px 28px rgba(18,60,85,.22)}.primary-button.full{width:100%}.secondary-button{color:var(--brand);background:#e8f0ec}.danger-button,.secondary-button{min-height:2.75rem;padding:0 .85rem}.danger-button{min-width:44px;border:1px solid rgba(158,60,52,.26);border-radius:8px;color:#9e3c34;font-weight:850;background:#fff3ef}.counter-screen{min-height:100vh;padding:max(1rem,env(safe-area-inset-top)) 1rem max(2rem,env(safe-area-inset-bottom))}.counter-header{display:grid;grid-template-columns:3rem 1fr auto;align-items:center;grid-gap:.85rem;gap:.85rem;margin-bottom:1rem}.counter-header h1{font-size:1.8rem}.counter-title-row{display:flex;align-items:baseline;gap:.8rem;flex-wrap:wrap}.header-actions{display:grid;grid-template-columns:minmax(0,auto) 3rem;grid-template-rows:3rem auto;align-items:center;justify-content:flex-end;grid-column-gap:.25rem;column-gap:.25rem}.header-user{display:contents}.header-user p{grid-column:1;grid-row:1;justify-self:end;margin:0;max-width:8.5rem;color:var(--muted);font-size:.82rem;font-weight:850;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.signout-row{margin:1.35rem 0 .15rem}.app-footer,.signout-row{display:flex;justify-content:center}.app-footer{margin:1rem 0 0}.app-footer p{margin:0;color:#a5b0ba;font-size:.68rem;font-weight:700;line-height:1.2}.signout-link{min-height:.85rem;border:0;padding:0;color:#a5b0ba;font-size:.64rem;font-weight:750;line-height:1;text-decoration:none;background:transparent}.signout-link:hover{color:var(--brand);text-decoration:underline;text-underline-offset:.16rem}.signout-link:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:3px}.editing-banner{margin:-.35rem 0 .85rem}.editing-banner p{margin:0;color:var(--brand);font-size:.86rem;font-weight:900;line-height:1.3}.icon-button{place-items:center;color:var(--brand);font-size:1.4rem;background:#e8f0ec}.icon-button,.sound-toggle{display:grid;width:3rem;height:3rem}.sound-toggle{place-items:center;border:0;border-radius:50%;padding:0;color:#ffffff;background:var(--brand)}.sound-toggle[aria-pressed=false]{background:#e8edf0;border:0;opacity:1}.sound-icon{display:block;width:1.75rem;height:1.75rem;object-fit:contain}.counter-panel,.empty-state,.history-row,.saved-count-row{border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.counter-panel{display:grid;grid-gap:.85rem;gap:.85rem;padding:1rem}.auth-panel{display:grid;grid-gap:.45rem;gap:.45rem}.auth-form,.auth-user{display:grid;grid-gap:.65rem;gap:.65rem}.auth-form,.auth-user{align-items:center}.auth-form:has(input){grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.auth-form:empty{display:none}.auth-form-header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.auth-form-header p{margin:0;color:var(--muted);font-size:.82rem;font-weight:850}.auth-close{width:2rem;height:2rem;display:grid;place-items:center;border:0;border-radius:8px;color:var(--muted);font-size:1.2rem;line-height:1;background:transparent}.auth-close:hover{color:var(--brand);background:#e8f0ec}.auth-close:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:2px}.admin-form input,.auth-form input,.save-form input{width:100%;min-width:0;min-height:2.75rem;border:1px solid #c7d3d9;border-radius:8px;padding:0 .8rem;color:var(--ink);background:#fffdf8}.admin-form input:focus-visible,.auth-form input:focus-visible,.danger-button:focus-visible,.save-form input:focus-visible,.secondary-button:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:3px}.secondary-button:disabled{cursor:not-allowed;opacity:.58}.danger-button:hover{color:#7f2d27;background:#ffe8e0}.confirmation-overlay{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:1rem;background:rgba(9,47,86,.42)}.confirmation-dialog{width:min(100%,23rem);display:grid;grid-gap:.85rem;gap:.85rem;border:1px solid rgba(158,60,52,.2);border-radius:8px;padding:1rem;color:var(--ink);background:var(--surface);box-shadow:0 28px 80px rgba(9,47,86,.28)}.confirmation-dialog h2,.confirmation-dialog p{margin:0}.confirmation-dialog h2{font-size:1.05rem;line-height:1.2}.confirmation-dialog p{color:var(--muted);font-size:.95rem;line-height:1.45}.confirmation-dialog strong{color:var(--ink);font-weight:900}.confirmation-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.65rem}.auth-user{grid-template-columns:auto minmax(0,1fr)}.auth-message,.auth-user p{margin:0;min-width:0;color:var(--muted);font-size:.82rem;line-height:1.35;overflow-wrap:anywhere}.sync-pill{display:inline-grid;min-height:1.7rem;place-items:center;border-radius:999px;padding:0 .65rem;color:#ffffff;font-size:.72rem;font-weight:850;background:var(--brand)}.sync-pill[data-state=local]{color:var(--muted);background:rgba(255,253,248,.72);border:1px solid #c7d3d9}.auth-message{color:var(--accent);font-weight:800}.auth-link{width:-moz-fit-content;width:fit-content;min-height:1.5rem;border:0;padding:0;color:var(--brand);font-size:.82rem;font-weight:850;text-align:left;text-decoration:underline;text-underline-offset:.2rem;background:transparent}.auth-link:hover{color:var(--accent)}.auth-link:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:3px}.admin-shell{min-height:100vh;display:grid;place-items:center;padding:max(1rem,env(safe-area-inset-top)) 1rem max(2rem,env(safe-area-inset-bottom))}.admin-panel{width:min(100%,34rem);display:grid;grid-gap:1.1rem;gap:1.1rem;padding:1.2rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.admin-panel h1{font-size:2rem}.admin-form{display:grid;grid-gap:.85rem;gap:.85rem}.admin-form label{display:grid;grid-gap:.4rem;gap:.4rem;color:var(--muted);font-size:.82rem;font-weight:850}.password-control{position:relative;display:block}.password-control input{padding-right:3.1rem}.password-toggle{position:absolute;top:50%;right:.3rem;width:2.15rem;height:2.15rem;display:grid;place-items:center;border:0;border-radius:8px;color:var(--muted);background:transparent;transform:translateY(-50%)}.password-toggle:hover{color:var(--brand);background:#e8f0ec}.password-toggle:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:2px}.eye-icon{position:relative;width:1.25rem;height:.78rem;border:2px solid;border-radius:999px 999px 999px 999px/760px 760px 760px 760px}.eye-icon:before{content:"";position:absolute;inset:50% auto auto 50%;width:.38rem;height:.38rem;border-radius:50%;background:currentColor;transform:translate(-50%,-50%)}.password-toggle[aria-pressed=true] .eye-icon:after{content:"";position:absolute;left:50%;top:-.3rem;width:2px;height:1.35rem;border-radius:999px;background:currentColor;transform:rotate(45deg)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.2rem 0 .6rem}.section-heading.compact{margin:0}.muted{margin-bottom:0;color:var(--muted);font-size:.92rem;line-height:1.4}.category-grid{display:grid;grid-template-columns:1fr;grid-gap:.7rem;gap:.7rem}.category-control{display:grid;grid-template-columns:minmax(0,1fr) 3.25rem;grid-gap:1rem;gap:1rem}.category-add{display:grid;grid-template-columns:2.4rem minmax(0,1fr) auto 3.25rem;align-items:center;grid-gap:.75rem;gap:.75rem;width:100%;min-height:5.45rem;padding:.9rem .9rem .9rem 1rem;color:var(--ink);text-align:left;background:#fffdf8;border:1px solid #c7d3d9;box-shadow:0 10px 26px rgba(18,48,68,.08);transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease,background-color .12s ease}.category-type-icon{display:grid;width:2.4rem;height:2.4rem;place-items:center;border-radius:50%;color:var(--brand);background:#e8f0ec}.category-type-icon svg{display:block;width:1.75rem;height:1.75rem;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.category-name{min-width:0;font-size:1.12rem;font-weight:850;line-height:1.15}.category-add:hover{border-color:rgba(18,60,85,.45);background:#ffffff;box-shadow:0 16px 34px rgba(18,48,68,.14)}.category-add:active,.category-subtract:active:not(:disabled){transform:translateY(1px) scale(.99)}.category-add:focus-visible,.category-subtract:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:3px}.category-add-icon{display:grid;width:3.25rem;height:3.25rem;place-items:center;border-radius:50%;color:#ffffff;font-size:1.95rem;font-weight:850;line-height:1;background:var(--brand)}.category-count{display:grid;min-width:2.25rem;height:3.25rem;place-items:center;color:var(--ink);font-size:1.5rem;font-weight:900}.category-subtract{display:grid;width:3.25rem;height:5.45rem;place-items:center;border:1px solid #c7d3d9;color:var(--muted);font-size:1.55rem;background:rgba(255,253,248,.72);box-shadow:0 10px 26px rgba(18,48,68,.06);transition:transform .12s ease,border-color .12s ease,background-color .12s ease}.category-subtract:hover:not(:disabled){border-color:rgba(18,60,85,.35);color:var(--ink);background:#ffffff}.category-subtract:disabled{cursor:not-allowed;opacity:.34}.category-chart{display:grid;grid-gap:.65rem;gap:.65rem}.category-chart-header{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem}.category-chart-header h3,.category-chart-header p{margin:0}.category-chart-header h3{font-size:.9rem;line-height:1.2}.category-chart-header p{color:var(--muted);font-size:.78rem;font-weight:850}.category-chart-bars{display:grid;grid-gap:.55rem;gap:.55rem}.category-chart-row{display:grid;grid-gap:.25rem;gap:.25rem}.category-chart-label{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;color:var(--muted);font-size:.78rem;font-weight:850;line-height:1.25}.category-chart-label span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.category-chart-label strong{color:var(--ink)}.category-chart-track{height:.55rem;overflow:hidden;border-radius:999px;background:#e8edf0}.category-chart-bar{display:block;width:var(--bar-width);height:100%;border-radius:inherit;background:var(--brand)}.history-list{display:grid;grid-gap:.65rem;gap:.65rem}.save-panel{margin-top:.85rem}.save-panel-collapsed{display:block}.save-form{grid-template-columns:minmax(0,1fr) auto}.save-form,.saved-count-list{display:grid;grid-gap:.65rem;gap:.65rem}.history-heading{justify-content:flex-start;gap:.65rem}.history-toggle{min-height:2rem;border:0;border-radius:8px;padding:0 .65rem;color:var(--brand);font-size:.78rem;font-weight:850;background:#e8f0ec}.history-toggle:hover{background:#dce8e2}.history-toggle:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:3px}.history-row{display:grid;grid-template-columns:4.5rem 1fr;grid-gap:.85rem;gap:.85rem;align-items:start;min-height:4.3rem;padding:.8rem;box-shadow:0 10px 26px rgba(18,48,68,.08)}.history-value{margin-bottom:0;color:var(--brand);font-size:1.8rem;font-weight:850;line-height:1}.history-category{margin:0 0 .2rem;font-weight:850;line-height:1.35}.saved-count-row{overflow:hidden;box-shadow:0 10px 26px rgba(18,48,68,.08)}.saved-count-toggle{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-gap:.8rem;gap:.8rem;align-items:center;border:0;padding:.85rem;color:var(--ink);text-align:left;background:#fffdf8}.saved-count-toggle:hover{background:#ffffff}.saved-count-toggle:focus-visible{outline:3px solid rgba(217,160,47,.55);outline-offset:-3px}.saved-count-toggle span{min-width:0;display:grid;grid-gap:.2rem;gap:.2rem}.saved-count-toggle strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;line-height:1.2}.saved-count-toggle span span,.saved-count-toggle time{color:var(--muted);font-size:.82rem;font-weight:800;line-height:1.25}.saved-count-toggle time{text-align:right}.saved-count-detail{display:grid;grid-gap:.85rem;gap:.85rem;border-top:1px solid var(--line);padding:.85rem;background:var(--surface)}.saved-total-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:.5rem;gap:.5rem}.saved-total-grid p{margin:0;display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;color:var(--muted);font-size:.82rem;font-weight:800;line-height:1.3}.saved-total-grid strong{color:var(--ink);font-size:1rem}.saved-count-actions{display:flex;flex-wrap:wrap;gap:.65rem;justify-content:flex-start}.empty-state{padding:1rem;box-shadow:0 10px 26px rgba(18,48,68,.08)}.empty-state p{margin-bottom:0;color:var(--muted)}@media (min-width:760px){.counter-screen{width:min(100%,720px);margin:1.5rem auto;border:1px solid var(--line);border-radius:8px;background:linear-gradient(180deg,#ffffff 0,var(--paper) 100%);box-shadow:var(--shadow)}}@media (min-width:761px){.hero{width:min(100%,560px);grid-template-columns:1fr;align-content:center;justify-items:center;gap:1.25rem}.art-wrap{width:-moz-fit-content;width:fit-content;max-width:100%}.brand-art{width:auto;max-width:min(100%,430px);max-height:calc(100vh - 8.5rem)}.intro{width:min(100%,430px);max-width:none;display:flex;justify-content:center}.intro .primary-button{min-width:14rem}}@media (max-width:760px){.home-screen{padding:0}.hero{min-height:100vh;min-height:100svh;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;align-content:start;gap:0}.art-wrap{position:relative;width:100%;height:calc(100vh - 6.5rem);height:calc(100svh - 6.5rem);display:grid;place-items:center;border-radius:0;box-shadow:none}.art-wrap picture{position:absolute;inset:0;display:grid;place-items:center}.brand-art{width:100%;height:calc(100vh - 6.5rem);height:calc(100svh - 6.5rem);max-width:100%;max-height:100%;object-fit:contain}.intro{width:min(100%,34rem);margin:0 auto;padding:.85rem 1.15rem max(1rem,env(safe-area-inset-bottom));text-align:center}.eyebrow{margin-bottom:.55rem;font-size:.72rem}h1{font-size:clamp(2.7rem,15vw,4.35rem)}.lede{margin:.9rem auto 1.25rem;font-size:1rem}}@media (max-width:420px){.counter-header{gap:.55rem}.counter-title-row{align-items:start;gap:.35rem}.header-user{flex-basis:auto}.auth-form:has(input){grid-template-columns:1fr}.save-form,.saved-count-toggle,.saved-total-grid{grid-template-columns:1fr}.saved-count-toggle time{text-align:left}.sound-toggle{padding-inline:.65rem;font-size:.78rem}.category-control{grid-template-columns:minmax(0,1fr) 3rem;gap:.55rem}.category-add{min-height:4.85rem;padding:.9rem;grid-template-columns:2.2rem minmax(0,1fr) auto 2.8rem;gap:.55rem}.category-type-icon{width:2.2rem;height:2.2rem}.category-type-icon svg{width:1.55rem;height:1.55rem}.category-add-icon{width:2.8rem;height:2.8rem}.category-count{height:2.8rem}.category-subtract{width:3rem;height:4.85rem}}