.easy-counter-entry { margin:16px 0; }
.home-main-column>.easy-counter-entry { order:210; }
.app-shell:has(> .screen > .ec-page) { overflow:clip; }
.ec-page { max-width:720px; margin:-20px auto 0; padding:0 0 30px; }
.ec-page-head,.ec-modal-head { display:flex; align-items:center; gap:8px; }
.ec-page-head { position:sticky; top:0; z-index:20; margin:0 -18px; padding:8px 12px 8px 18px; border-bottom:1px solid var(--yp-box-border,var(--line)); background:var(--yp-app-background,var(--panel)); }
.ec-page-head h2,.ec-modal-head h2 { flex:1; min-width:0; margin:0; font-size:var(--yp-font-A); font-family:inherit; overflow-wrap:anywhere; }
.ec-page :is(button,input,select),.ec-modal :is(button,input,select) { font-size:var(--yp-font-B); font-family:inherit; }
.ec-page button:not(.app-close-button),.ec-modal button:not(.app-close-button) { min-height:44px; border:1px solid var(--yp-box-border,var(--line)); border-radius:var(--yp-control-radius,8px); padding:8px 12px; display:flex; align-items:center; justify-content:center; gap:6px; color:var(--ink); background:var(--yp-box-background,var(--panel)); line-height:1.3; }
.ec-page button:active { transform:none; }
.ec-note,.ec-period,.ec-next,.ec-empty p { color:var(--muted); font-size:var(--yp-font-C); font-weight:var(--yp-font-weight,400); line-height:1.6; }
.ec-note { margin:12px 0 18px; }
.ec-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin-top:14px; }
.ec-card { position:relative; display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:8px; min-width:0; border:1px solid var(--yp-box-border,var(--line)); border-radius:var(--yp-control-radius,8px); padding:12px 8px; background:var(--yp-box-background,var(--panel)); }
.ec-copy { min-width:0; }
.ec-copy > :is(.ec-title-row,.ec-period) { position:relative; top:1px; }
.ec-card h3 { flex:1; min-width:0; margin:0; font-size:var(--yp-font-B); line-height:1.5; overflow-wrap:anywhere; }
.ec-title-row { display:flex; align-items:center; gap:4px; min-width:0; }
.ec-title-row h3 { flex:0 1 auto; }
.ec-period { margin:2px 0 0; padding-bottom:1px; overflow-wrap:anywhere; }
.ec-count-controls { display:flex; align-items:stretch; gap:4px; }
#app .ec-page button.ec-tap { width:64px; min-width:0; min-height:60px; padding:6px 4px; touch-action:manipulation; user-select:none; background:color-mix(in srgb,var(--yp-accent) 7%,var(--yp-box-background,var(--panel))); }
.ec-tap strong { max-width:100%; font-size:var(--yp-font-A)!important; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ec-goal span { font-size:var(--yp-font-C); color:var(--muted); }
.ec-confirm-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.ec-goal { display:flex; align-items:center; gap:6px; margin-top:5px; }
.ec-goal span { flex:none; }
.ec-goal progress { min-width:0; flex:1; }
#app .ec-page :is(.ec-grip,.ec-minus,.ec-reset) { min-width:0; padding:0; height:44px; min-height:44px; flex-shrink:0; }
#app .ec-page .ec-grip { width:24px; border:0; background:transparent; color:var(--muted); cursor:grab; touch-action:none; user-select:none; }
#app .ec-page .ec-settings { flex:0 0 28px; width:28px; min-width:28px; height:28px; min-height:28px; padding:0; border:0; background:transparent; color:var(--muted); }
#app .ec-page .ec-minus { width:28px; height:auto; min-height:60px; background:var(--soft); touch-action:manipulation; }
#app .ec-page .ec-reset { width:44px; height:auto; min-height:60px; color:var(--muted); font-size:var(--yp-font-C); touch-action:manipulation; }
.ec-grip svg { display:block; width:12px; height:20px; fill:currentColor; }
.ec-settings svg { display:block; width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.ec-card.ec-dragging { opacity:.5; border-style:dashed; }
.ec-reordering,.ec-reordering .ec-grip { cursor:grabbing!important; user-select:none; }
.ec-card.ec-drop-before::before,.ec-card.ec-drop-after::after { content:""; position:absolute; left:0; right:0; height:3px; border-radius:2px; background:var(--ink); pointer-events:none; }
.ec-card.ec-drop-before::before { top:-6px; }.ec-card.ec-drop-after::after { bottom:-6px; }
.ec-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip-path:inset(50%); white-space:nowrap; border:0!important; }
.ec-options { display:grid; gap:8px; }
#app .ec-options button { justify-content:space-between; width:100%; }
.ec-goal progress { appearance:none; width:100%; height:5px; border:0; border-radius:4px; overflow:hidden; background:var(--soft); accent-color:var(--yp-accent); }
.ec-goal progress::-webkit-progress-bar { background:var(--soft); }
.ec-goal progress::-webkit-progress-value { background:var(--yp-accent); }
.ec-empty { display:grid; justify-items:center; gap:12px; padding:40px 20px; border:1px dashed var(--yp-box-border,var(--line)); border-radius:var(--yp-box-radius,16px); text-align:center; }
.ec-empty strong { font-size:var(--yp-font-B); }.ec-empty p{margin:0;}
.ec-modal { max-height:min(760px,calc(100dvh - 28px)); overflow-y:auto; overscroll-behavior:contain; }
.ec-modal-head { position:sticky; top:-20px; z-index:1; padding:10px 0; background:var(--yp-box-background,var(--panel)); }
#easyCounterForm { padding-top:12px; }
#easyCounterForm > .ec-modal-head { top:-12px; padding:0 0 8px; border-bottom:1px solid var(--yp-box-border,var(--line)); }
.ec-field { display:grid; min-width:0; gap:7px; margin:15px 0; font-size:var(--yp-font-B); }
.ec-field input,.ec-field select { box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:10px; color:var(--ink); background:var(--yp-box-background,var(--panel)); border:1px solid var(--yp-box-border,var(--line)); border-radius:var(--yp-control-radius,8px); }
.ec-notice { padding:12px; background:var(--soft); color:var(--ink); font-size:var(--yp-font-C); line-height:1.6; border-radius:8px; }
.ec-editor-actions { display:flex; gap:8px; margin-top:20px; }.ec-editor-actions button{flex:1;}
#app .ec-page button.primary,#app .ec-modal button.primary { background:var(--ink); color:var(--panel); border-color:var(--ink); }
.ec-history { list-style:none; margin:0; padding:0; }.ec-history li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--yp-box-border,var(--line)); font-size:var(--yp-font-B); }
.ec-history span { min-width:0; overflow-wrap:anywhere; }.ec-history small { display:block; margin-top:4px; font-size:var(--yp-font-C); color:var(--muted); }.ec-history strong{font-size:var(--yp-font-A);}
body.dark-mode :is(.ec-page,.ec-modal){--ink:var(--dm-text,#f1f4f8);--muted:var(--dm-muted,#a3adba);--panel:var(--dm-surface,#171c23);--yp-box-background:var(--dm-surface,#171c23);--soft:var(--dm-surface-2,#222832);--line:var(--dm-border,#353d49);}
@media(max-width:359px){.ec-card{grid-template-columns:20px minmax(0,1fr) auto;gap:5px;padding:10px 6px;}#app .ec-page .ec-grip{width:20px;}#app .ec-page .ec-tap{width:56px;}.ec-goal{flex-wrap:wrap;}.ec-goal progress{flex-basis:100%;}}
@media(prefers-reduced-motion:reduce){.ec-page *{animation:none!important;transition:none!important;}}
