:root{--ink:#173640;--muted:#617983;--line:#d4e8ed;--paper:#fff;--canvas:#b9ebf7;--green:#176f84;--green-dark:#11596d;--green-soft:#e3f6fa;--mint:#d7f1f7;--orange:#c77a3e;--orange-soft:#fbf0e5;--lav:#7776a8;--lav-soft:#f0eff9;--shadow:0 6px 24px rgba(22,73,86,.08);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--canvas);font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--canvas)}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{max-width:1440px;margin:auto;padding:0 52px}.topbar{height:82px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand-mark{width:39px;height:39px;border-radius:13px;background:var(--green);display:flex;align-items:flex-end;justify-content:center;gap:3px;padding:10px}.brand-mark i{display:block;width:4px;border-radius:3px;background:#f9fff9}.brand-mark i:nth-child(1){height:10px}.brand-mark i:nth-child(2){height:17px}.brand-mark i:nth-child(3){height:13px}.brand-copy{display:flex;flex-direction:column;gap:2px}.brand-copy strong{font-size:16px;letter-spacing:-.4px}.brand-copy strong span{color:var(--green)}.brand-copy small{color:var(--muted);font-size:10px;letter-spacing:.15px}.topbar-right{display:flex;align-items:center;gap:18px}.save-status{font-size:11px;color:#65756e;display:flex;align-items:center;gap:7px}.status-dot,.tiny-dot{height:7px;width:7px;border-radius:50%;background:#4aa37d;display:inline-block;box-shadow:0 0 0 3px #ddf2f7}.icon-button{width:38px;height:38px;background:#fff;border:1px solid var(--line);border-radius:11px;display:grid;place-items:center;color:#4a6259}.icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}main{padding:39px 0 32px}.intro-row{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:27px}.eyebrow{font-size:9px;letter-spacing:1.45px;text-transform:uppercase;font-weight:700;color:#8b9a93;margin:0 0 7px}.intro-row h1{font-size:30px;letter-spacing:-1.1px;margin:0;font-weight:650}.intro-copy{font-size:12px;color:var(--muted);margin:7px 0 0}.period-control{display:flex;align-items:center;gap:12px}.segmented{display:flex;background:#e2f3f7;padding:3px;border-radius:9px}.segment{border:0;background:transparent;padding:8px 13px;font-size:10px;color:#718079;border-radius:7px}.segment.active{background:#fff;color:var(--ink);box-shadow:0 1px 4px #17364014;font-weight:650}.period-pickers{display:flex;gap:7px}.period-pickers select,.month-field select{appearance:none;border:1px solid var(--line);background:white;border-radius:8px;padding:9px 29px 9px 11px;color:var(--ink);font-size:11px;outline-color:#69aebe;background-image:url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23617983' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.summary-grid{display:grid;grid-template-columns:1.13fr 1fr 1fr;gap:15px;margin-bottom:19px}.summary-card,.panel{background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.summary-card{min-height:152px;padding:19px 21px;position:relative;overflow:hidden}.total-card{background:#e9f8fc;border-color:#d2edf3}.card-label{display:flex;align-items:center;gap:8px;color:#58717a;font-size:10px;font-weight:600}.label-icon{height:24px;width:24px;border-radius:8px;display:grid;place-items:center;font-size:13px}.total-icon{background:#d9f2f7;color:#246d81}.weekend-icon{background:var(--orange-soft);color:var(--orange)}.support-icon{background:var(--lav-soft);color:var(--lav);font-size:9px;font-weight:700}.metric-line{display:flex;align-items:baseline;gap:8px;margin-top:11px}.metric-line strong{font-size:31px;font-weight:640;letter-spacing:-1.3px;line-height:1}.metric-line>span{font-size:10px;color:#84918a}.metric-caption{font-size:10px;color:#87948d;margin:7px 0 0}.total-rule{height:3px;background:#d5edf2;border-radius:4px;margin-top:13px;width:100%}.total-rule span{display:block;width:0;height:100%;background:#3a91a5;border-radius:4px;transition:width .25s}.microcopy{font-size:8px;color:#788f97;margin:7px 0 0}.weekend-footer{position:absolute;left:21px;bottom:16px;display:flex;align-items:center;gap:8px;color:#71878f;font-size:9px}.weekend-footer .tiny-dot{width:6px;height:6px;box-shadow:none;background:#d28b53}.support-card{background:#f8f7fc;border-color:#ebeaf5}.support-card .metric-line strong{font-size:28px}.support-note{position:absolute;bottom:17px;display:flex;align-items:center;gap:7px;color:#8583a5;font-size:9px}.support-note span{font-size:13px;color:#9291ba}.workspace-grid{display:grid;grid-template-columns:minmax(300px,.83fr) minmax(0,1.5fr);gap:16px;margin-bottom:17px}.panel{padding:21px 23px}.register-panel{background:#fff}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:19px}.panel-heading h2{font-size:16px;letter-spacing:-.3px;margin:0;font-weight:650}.panel-heading .eyebrow{margin-bottom:5px}.heading-spark{color:#c0d6c8;font-size:20px}.field-label{display:block;font-size:10px;font-weight:650;color:#47584f;margin:0 0 7px}.select-wrap{position:relative}.select-wrap select,textarea{display:block;width:100%;border:1px solid #e3e9e5;border-radius:8px;background:#fff;color:var(--ink);outline-color:#89bba5;font-size:11px}.select-wrap select{appearance:none;padding:11px 35px 11px 12px;margin-bottom:15px}.select-wrap>span{position:absolute;right:13px;top:8px;color:#73847b;font-size:17px;pointer-events:none}textarea{resize:vertical;min-height:69px;padding:10px 12px;line-height:1.5;margin-bottom:14px}textarea::placeholder{color:#aab4ae}.form-split{display:grid;grid-template-columns:.8fr 1fr;gap:14px;margin-bottom:15px}.count-control{display:flex;height:34px;border:1px solid #e3e9e5;border-radius:8px;overflow:hidden}.count-control button{width:32px;background:#f8faf8;border:0;color:#668072;font-size:16px}.count-control input{width:calc(100% - 64px);border:0;border-left:1px solid #edf0ed;border-right:1px solid #edf0ed;text-align:center;color:#24362d;font-size:11px;outline:0;-moz-appearance:textfield}.count-control input::-webkit-inner-spin-button,.count-control input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.month-field select{width:100%;height:34px;padding:7px 29px 7px 9px}.check-row{border:1px solid #f0e8df;background:#fffaf5;border-radius:9px;padding:10px 11px;display:flex;align-items:center;gap:10px;cursor:pointer}.check-row input{position:absolute;opacity:0;pointer-events:none}.custom-check{height:16px;width:16px;flex:none;border:1px solid #d7d2c9;border-radius:5px;background:#fff;position:relative}.check-row input:checked+.custom-check{background:#c87d48;border-color:#c87d48}.check-row input:checked+.custom-check:after{content:"";position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.check-row input:focus-visible+.custom-check{outline:3px solid #e6c3a8}.check-copy{display:flex;flex-direction:column;gap:3px}.check-copy strong{font-size:9px;color:#685646}.check-copy small{font-size:8px;color:#a49587}.free-time-symbol{margin-left:auto;font-size:16px;color:#cf8751}.form-actions{display:flex;gap:12px;align-items:center;margin-top:15px}.primary-button{border:0;background:var(--green);color:#fff;border-radius:8px;padding:11px 15px;font-size:10px;font-weight:650;box-shadow:0 3px 7px #176f8423;transition:background .15s,transform .15s}.primary-button:hover{background:var(--green-dark);transform:translateY(-1px)}.primary-button span{font-size:14px;vertical-align:-1px;margin-right:4px}.text-button{background:none;border:0;color:#667e87;font-size:10px;padding:9px}.local-note{font-size:8px;color:#9aa59f;margin:12px 0 0;display:flex;align-items:center;gap:6px}.local-note span{font-size:13px}.overview-panel{padding-bottom:17px}.overview-heading{margin-bottom:12px}.period-badge{font-size:9px;padding:6px 10px;border-radius:99px;color:#517362;background:#e2f5f9}.category-overview{display:grid;grid-template-columns:1fr 1fr;column-gap:26px}.category-row{padding:10px 0;border-bottom:1px solid #eaf3f5;min-width:0}.category-topline{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:7px}.category-name{display:flex;align-items:flex-start;gap:8px;font-size:9px;color:#58685f;line-height:1.4}.category-dot{width:7px;height:7px;border-radius:3px;flex:none;margin-top:2px;background:#4e9caf}.category-value{font-size:10px;font-weight:700;color:#34483e;white-space:nowrap}.category-bar{height:3px;border-radius:3px;background:#e9f3f5;overflow:hidden;margin-left:15px}.category-bar span{height:100%;display:block;border-radius:3px;background:#72bdcb;min-width:0;transition:width .2s}.category-row:nth-child(3n) .category-dot{background:#8297a4}.category-row:nth-child(4n) .category-dot{background:#d19c60}.category-row:nth-child(5n) .category-dot{background:#8d8bc1}.excluded-box{margin-top:14px;border:1px solid #ecefed;border-radius:9px;background:#fafbfa;padding:11px 13px}.excluded-heading{display:flex;align-items:center;gap:7px}.excluded-icon{height:14px;width:14px;display:grid;place-items:center;border-radius:50%;background:#e9eeea;color:#7b8981;font-size:9px;font-weight:bold}.excluded-heading strong{font-size:9px;color:#77827c}.excluded-heading small{margin-left:auto;color:#a2aaa5;font-size:8px}.excluded-items{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}.excluded-item{display:flex;align-items:center;justify-content:space-between;gap:9px;color:#89928d;font-size:8px}.excluded-item strong{color:#748178;font-size:10px}.log-panel{padding:21px 23px 0}.log-heading{margin-bottom:17px}.log-heading h2{display:flex;align-items:center;gap:8px}.count-pill{background:#eef3ef;color:#76877d;border-radius:20px;padding:4px 7px;font-size:8px;font-weight:600;letter-spacing:0}.log-actions{display:flex;align-items:center;gap:8px}.search-box{height:33px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:8px;padding:0 9px;color:#9aa59f}.search-box svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}.search-box input{border:0;outline:0;width:143px;font-size:9px;color:var(--ink)}.search-box input::placeholder{color:#a4aea8}.log-actions select{height:33px;max-width:165px;appearance:none;border:1px solid var(--line);border-radius:8px;background:white;padding:0 27px 0 9px;font-size:9px;color:#64746b;outline-color:#89bba5;background-image:url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23617983' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}.contact-list{min-height:46px}.contact-entry{display:grid;grid-template-columns:minmax(190px,1.3fr) minmax(130px,1fr) 74px 86px;gap:14px;align-items:center;padding:13px 1px;border-top:1px solid #eaf3f5}.entry-main{min-width:0;display:flex;align-items:center;gap:10px}.entry-type-mark{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex:none;background:#e3f6fa;color:#337e92;font-size:12px}.entry-type-mark.gray{background:#f1f2f0;color:#949d97}.entry-detail{min-width:0}.entry-detail strong{display:block;font-size:10px;color:#2b4650;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entry-detail small{display:block;margin-top:4px;font-size:8px;color:#8a9790;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entry-category{font-size:8px;color:#87948d;line-height:1.4}.entry-badges{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.quantity-badge{background:#e7f4f7;color:#60776a;padding:5px 7px;border-radius:6px;font-size:8px;white-space:nowrap}.weekend-badge{background:#fff2e8;color:#bd7747;padding:5px 7px;border-radius:6px;font-size:8px;white-space:nowrap}.month-tag{color:#829188;background:#eaf7fa;padding:4px 6px;border-radius:5px;font-size:8px;white-space:nowrap}.entry-actions{display:flex;justify-content:flex-end;gap:2px;opacity:.68}.entry-actions button{border:0;background:transparent;width:28px;height:28px;border-radius:7px;color:#667e87;font-size:13px}.entry-actions button:hover{background:#eff4f0;color:#225f72}.entry-actions .delete-entry:hover{background:#fff0ed;color:#b15d50}.empty-state{text-align:center;padding:31px 15px 34px;border-top:1px solid #eaf3f5}.empty-state h3{margin:11px 0 5px;font-size:12px}.empty-state p{margin:0 auto;color:#89968f;font-size:9px;max-width:260px;line-height:1.6}.empty-illustration{height:45px;width:58px;position:relative;margin:auto}.empty-illustration span{position:absolute;border:1px solid #b8dfe8;background:#effafd;border-radius:9px;width:28px;height:35px;left:15px;top:4px;transform:rotate(-8deg)}.empty-illustration span:nth-child(2){left:23px;top:1px;transform:rotate(6deg);background:#fff}.empty-illustration span:nth-child(3){left:29px;top:8px;width:15px;height:15px;border-radius:50%;background:#c9edf4}.list-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #eaf3f5;padding:12px 1px;color:#9aa49e;font-size:8px}.local-storage-label{display:flex;align-items:center;gap:7px}.local-storage-label .status-dot{width:6px;height:6px;box-shadow:none}.app-footer{padding:19px 1px 25px;display:flex;align-items:center;gap:12px;font-size:8px;color:#9aa59f}.app-footer span:first-child{font-weight:650;color:#6e7e74}.app-footer button{margin-left:auto;border:0;background:none;color:#507987;font-size:8px}.backup-dialog{border:1px solid var(--line);border-radius:16px;width:min(410px,calc(100% - 32px));padding:27px;box-shadow:0 20px 60px #20352d33;color:var(--ink)}.backup-dialog::backdrop{background:#13261f55;backdrop-filter:blur(2px)}.dialog-close-form{position:absolute;right:12px;top:12px}.dialog-close{border:0;background:#f1f4f2;color:#738078;border-radius:50%;height:27px;width:27px;font-size:20px;line-height:1}.dialog-icon{height:40px;width:40px;display:grid;place-items:center;background:var(--green-soft);color:var(--green);border-radius:12px;margin-bottom:16px}.backup-dialog h2{font-size:21px;letter-spacing:-.5px;margin:0}.dialog-copy{font-size:11px;line-height:1.65;color:#79877f;margin:10px 0 18px}.full-button{width:100%;padding:12px}.import-button{display:block;text-align:center;padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:9px;font-size:10px;color:#61736a;cursor:pointer}.import-button:hover{background:#f7faf8}.dialog-footnote{font-size:8px;color:#9ca7a1;line-height:1.5;margin:13px 0 0}.toast{position:fixed;left:50%;bottom:25px;transform:translate(-50%,15px);background:#203a30;color:#fff;padding:11px 16px;border-radius:9px;font-size:10px;box-shadow:0 7px 22px #15271d33;opacity:0;pointer-events:none;transition:.2s;z-index:5}.toast.show{opacity:1;transform:translate(-50%,0)}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:980px){.app-shell{padding:0 28px}.workspace-grid{grid-template-columns:minmax(285px,.9fr) minmax(0,1.3fr)}.panel{padding-left:18px;padding-right:18px}.summary-card{padding-left:17px;padding-right:17px}.weekend-footer{left:17px}.category-overview{column-gap:15px}}
@media(max-width:760px){.app-shell{padding:0 20px}.topbar{height:70px}.intro-row{align-items:flex-start;gap:19px;flex-direction:column}.intro-row h1{font-size:27px}.period-control{width:100%;justify-content:space-between}.summary-grid{grid-template-columns:1fr 1fr;gap:10px}.summary-card{min-height:141px;padding:15px}.total-card{grid-column:1/-1;min-height:150px}.support-card{grid-column:1/-1;min-height:132px}.weekend-footer{left:15px;bottom:13px}.support-note{bottom:14px}.workspace-grid{grid-template-columns:1fr}.panel{padding:19px}.overview-panel{order:2}.log-heading{align-items:flex-start;flex-direction:column;gap:13px}.log-actions{width:100%}.search-box{flex:1}.search-box input{width:100%}.log-actions select{max-width:45%}.contact-entry{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;padding:12px 0}.entry-main{grid-column:1}.entry-category{grid-column:1;grid-row:2;padding-left:40px}.entry-badges{grid-column:2;grid-row:1;justify-content:flex-end}.entry-actions{grid-column:2;grid-row:2}.list-footer{padding:11px 0}.app-footer{gap:8px}.app-footer span:nth-child(2){display:none}}
@media(max-width:430px){.app-shell{padding:0 14px}.save-status{font-size:0}.save-status .status-dot{height:8px;width:8px}.topbar-right{gap:12px}.period-control{align-items:flex-start;flex-direction:column;gap:9px}.period-pickers{width:100%}.period-pickers select:first-of-type{flex:1}.summary-grid{gap:8px}.metric-line strong{font-size:28px}.support-card .metric-line strong{font-size:25px}.panel{padding:16px}.category-overview{grid-template-columns:1fr}.excluded-heading small{font-size:7px}.form-split{gap:9px}.app-footer{font-size:7px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.summary-grid.month-view{grid-template-columns:1.13fr 1fr}
@media(max-width:760px){.summary-grid.month-view{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.summary-grid.month-view{grid-template-columns:1fr 1fr}}
.summary-grid.month-view{grid-template-columns:1fr}
.summary-grid.year-view{grid-template-columns:1.13fr 1fr}
.form-split:not(.count-visible){grid-template-columns:1fr}
.support-check-row{margin:0 0 15px;background:#eef8fa;border-color:#d7edf2}
.support-check-row .check-copy strong{color:#315d68}
.support-check-row .check-copy small{color:#78949c}
.support-check-row input:checked+.custom-check{background:var(--green);border-color:var(--green)}
.support-check-toggle{position:relative;display:flex;align-items:center;gap:10px;flex:1;min-width:0;cursor:pointer}
.support-amount-field{display:flex;align-items:center;gap:5px;flex:none;color:#347c8e;font-size:10px;font-weight:700}
.support-amount-field input{width:78px;min-width:0;padding:6px 7px;border:1px solid #d4e8ed;border-radius:7px;background:#fff;color:var(--ink);font:inherit;font-weight:600;text-align:right;outline-color:#69aebe}
.check-row .support-amount-field input{position:static;opacity:1;pointer-events:auto;appearance:none}
.support-amount-field.is-disabled{color:#aebfc3}
.support-amount-field input:disabled{color:#aebfc3;-webkit-text-fill-color:#aebfc3;background:#f3f7f8;border-color:#e4edef;cursor:not-allowed;opacity:1}
.support-amount-field input:not(:disabled){color:var(--ink);-webkit-text-fill-color:var(--ink);background:#fff;border-color:#c6e0e7;cursor:text}
.support-badge{background:#e7f4f7;color:#31788a;padding:5px 7px;border-radius:6px;font-size:8px;white-space:nowrap}
.total-card .metric-caption{font-size:10px;color:#768b93;margin-top:8px}
@media(max-width:760px){.summary-grid.month-view{grid-template-columns:1fr}.summary-grid.year-view{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.summary-grid.month-view,.summary-grid.year-view{grid-template-columns:1fr}}

/* Keep the contact form first and prevent form controls from overflowing on phones. */
@media(max-width:760px){
  main{display:flex;flex-direction:column}
  .workspace-grid{display:contents}
  .register-panel{order:1;width:100%;max-width:100%;min-width:0;margin-bottom:17px}
  .summary-grid{order:2;width:100%;min-width:0}
  .overview-panel{order:3;width:100%;max-width:100%;min-width:0;margin-bottom:17px}
  .log-panel{order:4;width:100%;max-width:100%;min-width:0}
  .panel,#contact-form,#contact-form>*{min-width:0;max-width:100%}
  .select-wrap,.select-wrap select,textarea,.form-split,.month-field,.month-field select,.count-field,.count-control,.check-row{width:100%;min-width:0;max-width:100%}
  .check-copy{flex:1;min-width:0}
  .check-copy small{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
  .count-control input{min-width:0;flex:1;width:auto}
  .form-actions{flex-wrap:wrap}
  .period-pickers{width:100%;min-width:0}
  .period-pickers select{min-width:0;max-width:100%}
}
@media(max-width:430px){
  .form-split,.form-split.count-visible{grid-template-columns:minmax(0,1fr)}
}

/* Form first, then period selection and statistics. */
.dashboard-grid{display:grid;grid-template-columns:minmax(300px,.83fr) minmax(0,1.5fr);gap:16px;align-items:start;margin-bottom:17px}
.workspace-grid{display:block;grid-template-columns:minmax(0,1fr);min-width:0;margin:0}
.statistics-column{min-width:0}
.statistics-column .period-control{justify-content:space-between;flex-wrap:wrap;margin:0 0 17px}
.statistics-column .summary-grid{margin-bottom:0}
.statistics-detail{margin-top:17px;min-width:0}
.statistics-detail .overview-panel{width:100%}
.settings-form{margin-top:17px}
.settings-form .field-label{margin:12px 0 7px}
.settings-input{display:block;width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;padding:11px 12px;background:#fff;color:var(--ink);font:inherit;outline-color:#69aebe}
.settings-form .form-actions{margin-top:18px}
.reset-button{margin-left:auto;min-height:36px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#f6fbfc;color:#507987;font-size:10px;font-weight:650;white-space:nowrap}
@media(max-width:980px){.dashboard-grid{grid-template-columns:minmax(260px,.9fr) minmax(0,1.3fr);gap:14px}}
@media(max-width:760px){
  .dashboard-grid{grid-template-columns:minmax(0,1fr);gap:0}
  .workspace-grid{display:block;margin:0 0 17px}
  .register-panel{margin-bottom:0}
  .statistics-column .period-control{align-items:center;flex-direction:row;gap:10px;margin-bottom:13px}
  .statistics-column .period-pickers{flex:1;justify-content:flex-end}
  .statistics-column .period-pickers select:first-of-type{flex:1}
  .statistics-column .summary-grid{margin-bottom:0}
}
@media(max-width:430px){
  .statistics-column .period-control{align-items:flex-start;flex-direction:column;gap:9px}
  .statistics-column .period-pickers{width:100%}
}
@media(max-width:760px){
  .topbar,.topbar-right,.brand{filter:none!important;backdrop-filter:none!important;box-shadow:none!important}
  .topbar{background:var(--canvas)}
  .topbar .status-dot{box-shadow:none!important}
  .topbar .icon-button{box-shadow:none!important}
}

.total-card .period-control{width:100%;margin:0 0 17px;gap:10px}
.total-card .period-pickers{flex:1;min-width:0}
.total-card .period-pickers select:first-of-type{flex:1;min-width:0}
.total-card .period-pickers select:last-of-type{flex:none}
@media(max-width:430px){.total-card .period-control{align-items:flex-start;flex-direction:column;gap:9px}.total-card .period-pickers{width:100%}}
@media(max-width:760px){
  html,body,.app-shell,main,.topbar{background-image:none!important}
  .app-shell *{box-shadow:none!important;text-shadow:none!important;filter:none!important;backdrop-filter:none!important}
  .topbar{border:0!important;border-bottom:0!important;isolation:isolate;opacity:1!important;transform:none!important}
  .topbar *{-webkit-filter:none!important;-webkit-backdrop-filter:none!important;-webkit-text-stroke:0 transparent!important;opacity:1!important;transform:none!important;-webkit-font-smoothing:antialiased;text-rendering:geometricPrecision}
  .topbar .brand-copy strong{font-weight:700;color:#173640}
  .topbar .brand-copy small{font-size:11px;color:#4f6b75}
  .topbar .brand-mark{image-rendering:-webkit-optimize-contrast}
  .topbar .icon-button{-webkit-appearance:none!important;appearance:none!important;border:1px solid #c8e2e9!important;background:#fff!important;transition:none!important}
  .topbar,.topbar *{-webkit-box-shadow:none!important;-webkit-filter:none!important;-webkit-backdrop-filter:none!important;-webkit-appearance:none!important;box-shadow:none!important;text-shadow:none!important}
}

/* Brand icon: compact house and person silhouette */
.brand-mark{align-items:center;padding:0;flex:none}
.brand-mark svg{display:block;width:100%;height:100%;overflow:visible}
.brand-mark .icon-house{fill:none;stroke:#f8feff;stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round}
.brand-mark .icon-window{fill:#b9ebf7;stroke:none}
.brand-mark .icon-person{fill:#f6bb73;stroke:none}


/* Generated house and woman app icon */
.brand-mark{align-items:center;padding:0;background:transparent;border-radius:11px;overflow:hidden;flex:none}
.brand-mark img{display:block;width:100%;height:100%;object-fit:cover}

/* Registration period and iOS search sizing */
.entry-period{min-width:0}
.entry-period-pickers{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.78fr);gap:8px}
.entry-period-pickers select{appearance:none;width:100%;min-width:0;height:34px;padding:7px 26px 7px 9px;border:1px solid #e3e9e5;border-radius:8px;background:#fff;color:var(--ink);font-size:11px;outline-color:#89bba5}
@media(max-width:760px){.entry-period,.entry-period-pickers,.entry-period-pickers select{width:100%;min-width:0;max-width:100%}.search-box input{font-size:16px!important}}
.entry-type-mark svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}

/* Statistics period controls: keep the year selector beside the mode tabs. */
.total-card .period-control{display:flex;flex-direction:column;align-items:stretch;gap:9px}
.period-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0}
.period-toolbar select{appearance:none;flex:none;width:100px;min-width:82px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:9px 28px 9px 11px;color:var(--ink);font-size:11px;outline-color:#69aebe;background-image:url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23617983' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.total-card .period-pickers{width:100%;flex:none}
.total-card .period-pickers select{width:100%;min-width:0}
.total-card .period-control{margin-bottom:17px}
@media(max-width:430px){.total-card .period-control{align-items:stretch;flex-direction:column;gap:9px}.period-toolbar{flex-direction:row;align-items:center}.period-toolbar .segmented{flex:none}.period-toolbar .segment{padding:8px 10px;font-size:10px}.period-toolbar select{width:88px;min-width:82px;padding:9px 25px 9px 9px}.total-card .period-pickers{width:100%}}
.log-title-line{display:flex;align-items:center;gap:9px}
.log-toggle{width:30px;height:30px;flex:none;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:#f4fbfc;color:#367789;transition:background .15s,transform .15s}
.log-toggle:hover{background:#e4f5f8}
.log-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
.log-expanded .log-toggle svg{transform:rotate(180deg)}
.log-toggle{width:auto;min-width:30px;padding:0 9px;display:flex;align-items:center;justify-content:center;gap:5px}
.log-toggle span{font-size:9px;font-weight:650;white-space:nowrap}
.log-panel:not(.log-expanded) #entry-count,.log-panel:not(.log-expanded) .list-footer{display:none}
.app-footer{position:relative}
.app-footer>span:nth-child(3){position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap}
@media(max-width:760px){.app-footer{flex-wrap:wrap}.app-footer>span:first-child{order:1}.app-footer>span:nth-child(3){position:static;order:3;flex:0 0 100%;transform:none;margin:4px 0 0;text-align:center}.app-footer button{order:2}}
.secondary-button{display:block;width:100%;margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:8px;background:#f6fbfc;color:#246d81;font-size:10px;font-weight:650}
.secondary-button:hover,.faq-link:hover{background:#e7f6f9}
.faq-link{display:flex;width:100%;align-items:center;justify-content:space-between;margin-top:15px;padding:12px 13px;border:1px solid var(--line);border-radius:9px;background:#f6fbfc;color:#246d81;font-size:11px;font-weight:650;text-align:left}
.faq-link span{font-size:20px;line-height:12px}
.faq-dialog{width:min(700px,calc(100% - 28px));max-height:min(88dvh,900px);overflow-y:auto;padding:30px 34px}
.faq-content{display:grid;gap:4px}
.faq-item{border-top:1px solid #e8f0ef;padding:13px 0}
.faq-item h3{margin:0 0 7px;font-size:13px;color:var(--ink)}
.faq-item p,.faq-item li{color:#637771;font-size:11px;line-height:1.65}
.faq-item p{margin:6px 0}
.faq-item ol{padding-left:20px;margin:7px 0}
@media(max-width:430px){.faq-dialog{padding:25px 20px}.faq-item h3{font-size:12px}.faq-item p,.faq-item li{font-size:10px}}
/* Prevent iOS Safari from zooming the page when a form control receives focus. */
@media(max-width:760px){input:not([type="checkbox"]):not([type="radio"]),textarea,select{font-size:16px!important}}
/* Keep the iOS standalone app header crisp and opaque. */
@media(max-width:760px){
  html,body,.app-shell,.topbar,.topbar *{filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;text-shadow:none!important;-webkit-font-smoothing:auto!important;text-rendering:auto!important}
  .topbar{background-color:#b9ebf7!important;isolation:isolate;opacity:1!important}
  .topbar::before,.topbar::after,.brand::before,.brand::after{content:none!important;display:none!important}
  .topbar .brand-mark img{filter:none!important;-webkit-filter:none!important;image-rendering:auto!important}
}

/* iOS home-screen app: render the header on an opaque layer without visual effects. */
@media (max-width:760px){
  html,body,body *{filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;mix-blend-mode:normal!important}
  .topbar,.topbar *,.topbar *::before,.topbar *::after{filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important;text-shadow:none!important;opacity:1!important;transform:none!important;mix-blend-mode:normal!important}
  .topbar{position:relative!important;z-index:1!important;background:#b9ebf7!important;background-image:none!important;isolation:isolate!important;contain:none!important}
  .topbar::before,.topbar::after,.topbar *::before,.topbar *::after{content:none!important;display:none!important}
}
@media (display-mode:standalone) and (max-width:760px){
  html,body,.app-shell,.topbar{background-color:#b9ebf7!important}
  .app-shell{padding:env(safe-area-inset-top) max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left))!important}
  .topbar{position:relative!important;z-index:1!important}
}
/* iOS 27 home-screen apps paint a system blur over the first ~20px below the status inset. */
@media (max-width:760px){
  html.ios-standalone-blur-gap .topbar{margin-top:20px!important}
}
