@scope (.mermer-workbench) {
:scope {
      --paper:#f4f7f5; --surface:#ffffff; --surface-2:#edf2ee; --ink:#26342e; --muted:#65736c;
      --line:#d5ded8; --orange:#c85f4b; --orange-soft:#f8e2dd; --green:#34745a; --green-soft:#dcebe3;
      --blue:#6d8795; --blue-soft:#dce8ed; --yellow:#d5a947; --red:#b85f55; --shadow:0 12px 32px rgba(69,59,45,.08);
      --radius:8px; --nav-height:76px;
    }
    *{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;background:var(--paper);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-size:14px;letter-spacing:0}
    button,input,select,textarea{font:inherit;color:inherit;letter-spacing:0} button{cursor:pointer} button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(109,135,149,.25);outline-offset:2px}
    svg{display:block} .icon{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
    .app-header{position:sticky;top:0;z-index:20;background:rgba(247,242,233,.94);backdrop-filter:blur(14px);border-bottom:1px solid rgba(222,215,203,.85)}
    .header-inner{max-width:1120px;margin:auto;min-height:72px;padding:10px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}
    .brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{width:42px;height:42px;border-radius:8px;background:var(--orange);color:white;display:grid;place-items:center;box-shadow:0 6px 18px rgba(216,120,85,.22)}
    .brand-mark svg{width:25px;height:25px}.brand h1{font-size:18px;line-height:1.15;margin:0;font-weight:800}.baby-meta{color:var(--muted);font-size:12px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}
    .header-actions{display:flex;gap:7px}.icon-btn{width:40px;height:40px;border:1px solid var(--line);border-radius:7px;background:var(--surface);display:grid;place-items:center;color:var(--ink)}.icon-btn:hover{border-color:var(--orange);color:var(--orange)}
    main{max-width:1120px;margin:0 auto;padding:24px 18px calc(var(--nav-height) + 34px)}
    .page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:22px}.page-title h2{font-size:26px;line-height:1.2;margin:0 0 7px}.page-title p{margin:0;color:var(--muted);line-height:1.6}.head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
    .btn{min-height:40px;border:1px solid transparent;border-radius:6px;padding:9px 14px;background:var(--orange);color:white;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn:hover{filter:brightness(.96)}.btn.secondary{background:var(--surface);color:var(--ink);border-color:var(--line)}.btn.ghost{background:transparent;color:var(--ink);border-color:transparent}.btn.green{background:var(--green)}.btn.danger{background:#fff4f1;border-color:#efd2cc;color:var(--red)}.btn.small{min-height:34px;padding:7px 10px;font-size:13px}.btn:disabled{opacity:.5;cursor:not-allowed}
    .grid-2{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);gap:18px;align-items:start}.grid-equal{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.panel-pad{padding:18px}.panel-head{min-height:58px;padding:14px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-head h3,.section-title{font-size:16px;margin:0}.subtle{color:var(--muted);font-size:12px;line-height:1.55}.source-note{margin-top:14px;color:var(--muted);font-size:11px;line-height:1.6}.source-note a{color:var(--blue)}
    .summary-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}.metric{background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--orange);padding:14px;border-radius:6px;min-width:0}.metric:nth-child(2){border-top-color:var(--green)}.metric:nth-child(3){border-top-color:var(--blue)}.metric:nth-child(4){border-top-color:var(--yellow)}.metric strong{font-size:22px;display:block;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.metric span{color:var(--muted);font-size:12px}
    .bottom-nav{position:fixed;z-index:30;left:0;right:0;bottom:0;padding:0 10px max(6px,env(safe-area-inset-bottom));background:rgba(255,253,248,.96);border-top:1px solid var(--line);backdrop-filter:blur(16px)}
    .nav-inner{height:var(--nav-height);max-width:760px;margin:auto;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:center}.nav-btn{height:60px;border:0;background:transparent;border-radius:6px;color:var(--muted);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:3px 1px;min-width:0}.nav-btn .icon{width:21px;height:21px}.nav-btn span{font-size:10px;white-space:nowrap}.nav-btn.active{color:var(--orange);background:#fbebe2;font-weight:700}
    .calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px}.month-label{font-size:16px;font-weight:800}.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr)}.calendar-week{padding:12px 12px 4px;color:var(--muted);font-size:11px;text-align:center}.calendar-grid{padding:5px 12px 14px;gap:3px}.day{aspect-ratio:1/1;min-width:0;border:1px solid transparent;background:transparent;border-radius:6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative}.day:hover{background:var(--surface-2)}.day.other{opacity:.3}.day.today{border-color:var(--orange)}.day.selected{background:var(--orange);color:white}.day-num{font-size:12px}.day-dot{width:5px;height:5px;border-radius:50%;background:var(--green)}.day.selected .day-dot{background:white}.day.done:after{content:"";position:absolute;right:4px;top:4px;width:6px;height:6px;border-radius:50%;background:var(--green-soft);border:1px solid var(--green)}
    .selected-date{font-size:15px;font-weight:800;margin-bottom:4px}.meal-item,.list-row{padding:14px 0;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;gap:11px}.meal-item:last-child,.list-row:last-child{border-bottom:0}.check{width:24px;height:24px;border-radius:6px;border:1px solid var(--line);background:white;display:grid;place-items:center;flex:0 0 auto;color:white}.check.done{background:var(--green);border-color:var(--green)}.meal-main,.row-main{min-width:0;flex:1}.meal-main strong,.row-main strong{display:block;margin-bottom:4px}.meal-note{font-size:12px;color:var(--muted);line-height:1.5}.row-actions{display:flex;gap:4px;align-items:center}.mini-icon{width:32px;height:32px;border:0;background:transparent;border-radius:6px;display:grid;place-items:center;color:var(--muted)}.mini-icon:hover{background:var(--surface-2);color:var(--orange)}
    .suggestion{background:var(--green-soft);border-left:4px solid var(--green);padding:14px;border-radius:5px;margin-bottom:14px}.suggestion strong{display:block;margin-bottom:5px}.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.tag{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:999px;background:var(--surface-2);font-size:11px;color:var(--muted)}.tag.warn{background:#fae1da;color:var(--red)}.tag.green{background:var(--green-soft);color:#466852}.tag.blue{background:var(--blue-soft);color:#506d7c}
    .allergy-input{display:flex;gap:7px;margin-top:12px}.allergy-input input{flex:1;min-width:0}.empty{padding:28px 16px;text-align:center;color:var(--muted)}.empty-icon{width:46px;height:46px;border-radius:8px;background:var(--surface-2);display:grid;place-items:center;margin:0 auto 10px;color:var(--green)}
    .filter-bar{display:flex;gap:8px;overflow:auto;padding-bottom:3px}.filter{border:1px solid var(--line);background:var(--surface);padding:7px 11px;border-radius:999px;white-space:nowrap;font-size:12px}.filter.active{background:var(--ink);color:white;border-color:var(--ink)}
    .vaccine-list{display:grid}.vaccine-row{display:grid;grid-template-columns:92px minmax(180px,1.25fr) minmax(120px,.85fr) 100px;gap:12px;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}.vaccine-row:last-child{border-bottom:0}.vaccine-row.done{background:#f1f7f1}.vaccine-row.overdue{background:#fff7f4}.vax-age{font-size:12px;color:var(--muted)}.status{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700}.status:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--muted)}.status.done{color:var(--green)}.status.done:before{background:var(--green)}.status.soon{color:#a57a22}.status.soon:before{background:var(--yellow)}.status.overdue{color:var(--red)}.status.overdue:before{background:var(--red)}
    .chart-wrap{height:340px;padding:14px 12px 8px;position:relative}.chart-wrap canvas{width:100%!important;height:100%!important}.segmented{display:inline-grid;grid-auto-flow:column;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:var(--surface)}.segment{border:0;background:transparent;padding:8px 12px;font-size:12px}.segment.active{background:var(--ink);color:white}.history-table{width:100%;border-collapse:collapse}.history-table th,.history-table td{text-align:left;padding:11px 14px;border-bottom:1px solid var(--line);font-size:12px}.history-table th{color:var(--muted);font-weight:500;background:#faf7f1}.history-table tr:last-child td{border-bottom:0}
    .timeline{position:relative;padding-left:27px}.timeline:before{content:"";position:absolute;left:8px;top:8px;bottom:8px;width:2px;background:var(--line)}.timeline-item{position:relative;padding:0 0 22px 10px}.timeline-item:before{content:"";position:absolute;left:-24px;top:4px;width:12px;height:12px;border-radius:50%;background:var(--orange);border:3px solid var(--surface)}.timeline-date{font-size:11px;color:var(--muted);margin-bottom:5px}.timeline-title{font-weight:800;font-size:15px;margin-bottom:4px}.milestone-presets{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.preset{border:1px solid var(--line);border-radius:6px;background:var(--surface);padding:13px;text-align:left;display:flex;gap:10px;align-items:center}.preset:hover{border-color:var(--orange)}.preset-icon{width:36px;height:36px;border-radius:7px;background:var(--orange-soft);display:grid;place-items:center;font-size:18px}.preset small{display:block;color:var(--muted);margin-top:3px}
    .activity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.activity-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:16px;min-height:182px;display:flex;flex-direction:column}.activity-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.activity-card h3{font-size:15px;margin:9px 0 7px}.activity-card p{font-size:12px;color:var(--muted);line-height:1.65;margin:0 0 12px}.activity-meta{margin-top:auto;display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px}.activity-actions{display:flex;gap:4px}.activity-actions .mini-icon.active{color:var(--orange);background:#fbebe2}
    .quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.quick-card{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);padding:16px;text-align:left;min-height:132px;display:flex;flex-direction:column;justify-content:space-between}.quick-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.quick-icon{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--orange-soft);color:var(--orange)}.quick-card:nth-child(2) .quick-icon{background:var(--blue-soft);color:var(--blue)}.quick-card:nth-child(3) .quick-icon{background:var(--green-soft);color:var(--green)}.quick-card strong{font-size:16px}.quick-card span{display:block;color:var(--muted);font-size:11px;margin-top:4px}
    .record-icon{width:36px;height:36px;border-radius:7px;display:grid;place-items:center;background:var(--surface-2);color:var(--orange);flex:0 0 auto}.record-time{text-align:right;font-size:11px;color:var(--muted);white-space:nowrap}
    .travel-map{height:430px;background:#dfe9e1;position:relative;overflow:hidden;cursor:crosshair}.travel-map.leaflet-container{font-family:inherit;background:#dfe9e1}.map-status{position:absolute;z-index:700;left:50%;top:16px;transform:translateX(-50%);background:rgba(53,68,63,.9);color:white;border-radius:5px;padding:7px 10px;font-size:11px;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:.2s;white-space:nowrap;max-width:calc(100% - 28px);overflow:hidden;text-overflow:ellipsis}.map-status.show{opacity:1}.map-coordinate{min-height:42px;border-top:1px solid var(--line);padding:11px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#faf7f1;color:var(--muted);font-size:11px}.map-coordinate strong{color:var(--ink);font-weight:700}.travel-pin{width:30px;height:30px;border:2px solid white;border-radius:50% 50% 50% 8px;background:var(--orange);box-shadow:0 5px 10px rgba(65,56,45,.3);transform:rotate(-45deg);position:relative}.travel-pin:after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:white;left:9px;top:9px}.leaflet-popup-content-wrapper{border-radius:7px;box-shadow:var(--shadow)}.leaflet-popup-content{margin:11px 13px;line-height:1.55}.leaflet-control-attribution{font-size:9px!important}.leaflet-bar{border:1px solid var(--line)!important;box-shadow:var(--shadow)!important}.leaflet-bar a{color:var(--ink)!important}.leaflet-bar a:hover{background:var(--surface-2)!important}.map-provider{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:11px}.map-provider:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--green)}.trip-thumb{width:48px;height:48px;border:0;border-radius:6px;padding:0;overflow:hidden;background:var(--surface-2);flex:0 0 auto}.trip-thumb img,.photo-thumb img,.trip-photo-view img,.trip-photo-edit img{width:100%;height:100%;display:block;object-fit:cover}.photo-picker{min-height:42px;border:1px dashed #c9c0b4;border-radius:6px;background:#faf7f1;display:flex;align-items:center;justify-content:center;gap:7px;color:var(--ink);font-weight:700;cursor:pointer}.photo-picker:hover{border-color:var(--orange);color:var(--orange)}.photo-picker input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:9px}.photo-thumb,.trip-photo-edit{aspect-ratio:1;border-radius:6px;overflow:hidden;position:relative;background:var(--surface-2)}.trip-photo-edit .mini-icon{position:absolute;right:5px;top:5px;background:rgba(46,42,37,.78);color:white}.photo-remove{position:absolute;right:5px;top:5px;width:28px;height:28px;border:0;border-radius:50%;display:grid;place-items:center;background:rgba(46,42,37,.78);color:white}.photo-empty{border:1px dashed var(--line);border-radius:6px;min-height:72px;display:grid;place-items:center;color:var(--muted);font-size:11px;grid-column:1/-1}.trip-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px}.trip-photo-view{aspect-ratio:4/3;border:0;padding:0;border-radius:6px;overflow:hidden;background:var(--surface-2)}.photo-full{display:block;width:100%;max-height:68vh;object-fit:contain;border-radius:6px;background:#f2eee6}
    dialog{border:0;padding:0;border-radius:8px;background:var(--surface);color:var(--ink);width:min(520px,calc(100vw - 28px));max-height:min(86vh,760px);box-shadow:0 24px 80px rgba(40,36,30,.25)}dialog::backdrop{background:rgba(44,48,44,.45);backdrop-filter:blur(3px)}.modal-head{height:60px;padding:0 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modal-head h2{font-size:17px;margin:0}.modal-body{padding:18px;overflow:auto;max-height:calc(86vh - 60px)}.modal-close{border:0;background:transparent;width:36px;height:36px;border-radius:6px;display:grid;place-items:center}.modal-close:hover{background:var(--surface-2)}
    .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field.full{grid-column:1/-1}.field label{font-size:12px;font-weight:700}.field small{color:var(--muted);line-height:1.5}.input,input,select,textarea{width:100%;border:1px solid var(--line);border-radius:6px;background:white;padding:10px 11px;min-height:42px}textarea{min-height:88px;resize:vertical}.input-row{display:flex;gap:8px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
    .sync-output{background:#f2eee6;border:1px dashed #c9c0b4;border-radius:6px;padding:12px;min-height:90px;max-height:170px;overflow:auto;word-break:break-all;font-family:Consolas,monospace;font-size:11px;line-height:1.55}.sync-tabs{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-bottom:16px}.sync-tab{border:1px solid var(--line);background:var(--surface);padding:10px;border-radius:6px}.sync-tab.active{background:var(--ink);color:white;border-color:var(--ink)}
    .toast{position:fixed;z-index:80;left:50%;bottom:calc(var(--nav-height) + 18px);transform:translate(-50%,18px);background:var(--ink);color:white;border-radius:6px;padding:10px 14px;opacity:0;pointer-events:none;transition:.2s;max-width:calc(100vw - 30px);text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:var(--red)}
    @media(max-width:760px){main{padding:18px 12px calc(var(--nav-height) + 28px)}.header-inner{padding:9px 12px}.brand-mark{width:38px;height:38px}.brand h1{font-size:16px}.page-head{align-items:flex-start}.page-title h2{font-size:22px}.grid-2,.grid-equal{grid-template-columns:1fr}.summary-strip{grid-template-columns:repeat(2,1fr)}.metric strong{font-size:19px}.activity-grid{grid-template-columns:1fr}.vaccine-row{grid-template-columns:72px minmax(130px,1fr) 82px;padding:12px}.vaccine-row .vax-place{display:none}.quick-grid{gap:8px}.quick-card{min-height:120px;padding:13px}.travel-map{height:340px}.chart-wrap{height:300px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.nav-btn span{font-size:9px}.nav-inner{height:70px}.panel-pad{padding:15px}}
    @media(max-width:390px){.page-head{display:block}.head-actions{margin-top:12px;justify-content:flex-start}.quick-grid{grid-template-columns:1fr}.quick-card{min-height:92px;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px}.milestone-presets{grid-template-columns:1fr}.baby-meta{max-width:160px}.header-actions .icon-btn:first-child{display:none}.calendar-grid{padding-left:7px;padding-right:7px}.calendar-week{padding-left:7px;padding-right:7px}}
    @media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
}
@scope (.mermer-workbench) {
  :scope { min-height: 100dvh; background: var(--paper); }
  .app-header { background: rgba(244, 247, 245, .95); }
  .bottom-nav { background: rgba(255, 255, 255, .96); }
  .brand, .nav-btn { color: inherit; text-decoration: none; }
  .brand > span:last-child, .brand strong, .brand small { display: block; }
  .brand strong { font-size: 16px; }
  .brand-mark .icon { width: 25px; height: 25px; }
  .nav-btn .icon { width: 21px; height: 21px; }
  .mini-icon .icon, .check .icon { width: 17px; height: 17px; }
}
