:root{--bg:#f4f5fb;--card:#fff;--ink:#1f2937;--muted:#6b7280;--line:#e5e7eb;--primary:#4f46e5;--shadow:0 8px 30px rgba(31,41,55,.08)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink)}body{padding-bottom:96px}button,input,textarea{font:inherit}button{cursor:pointer}.app-header{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px}.logo{font-size:30px}.brand-text h1{font-size:18px;margin:0}.brand-text p{font-size:12px;color:var(--muted);margin:2px 0 0}.header-actions{display:flex;align-items:center;gap:8px}.icon-btn{border:0;background:#eef2ff;border-radius:12px;padding:9px 10px}.sync-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 10px;display:flex;align-items:center;gap:7px;font-size:12px;max-width:210px}.sync-dot{width:8px;height:8px;border-radius:50%;background:#9ca3af;flex:0 0 auto}.sync-chip.ok .sync-dot{background:#16a34a}.sync-chip.syncing .sync-dot{background:#f59e0b}.sync-chip.error .sync-dot{background:#dc2626}.sync-chip.offline .sync-dot{background:#6b7280}.tabs{position:sticky;top:68px;z-index:15;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-bottom:1px solid var(--line)}.tab{position:relative;border:0;background:#fff;padding:10px 4px 9px;font-size:11px;font-weight:700;color:#6b7280}.tab.active{color:var(--primary);box-shadow:inset 0 -3px var(--primary)}.tab-emoji{display:block;font-size:19px;margin-bottom:2px}.tab-badge{position:absolute;top:5px;right:8px;background:#ef4444;color:#fff;border-radius:999px;min-width:17px;height:17px;line-height:17px;font-size:10px}main{max-width:760px;margin:0 auto;padding:16px}.person-head,.all-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}.person-head h2,.all-head h2{margin:0;font-size:22px}.person-head p,.all-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.p-avatar{width:52px;height:52px;border-radius:17px;display:grid;place-items:center;font-size:28px}.cal-card,.fam-card,.welcome{background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);margin-bottom:14px}.cal-card{padding:12px}.cal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.cal-nav,.day-nav{border:0;background:#eef2ff;color:#4338ca;border-radius:10px;width:34px;height:34px;font-size:24px}.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.cal-dow{text-align:center;font-size:11px;font-weight:700;color:#9ca3af;padding:4px}.cal-cell{border:0;background:transparent;border-radius:11px;min-height:42px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.cal-cell.today{outline:1px solid #a5b4fc}.cal-cell.sel{background:#4f46e5;color:#fff}.cal-cell.empty{pointer-events:none}.cal-dots{height:4px;display:flex;gap:2px}.cal-dots i{display:block;width:4px;height:4px;border-radius:50%}.day-bar{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:8px;margin-bottom:16px}.day-title{flex:1;text-align:center;font-size:13px}.day-title b{display:block}.today-chip{display:inline-block;margin-top:3px;background:#dcfce7;color:#166534;padding:2px 7px;border-radius:999px;font-size:10px}.btn-today{border:0;background:#eef2ff;color:#4338ca;border-radius:9px;padding:7px 8px;font-size:11px}.sec-title{font-size:15px;margin:18px 2px 9px}.list{display:flex;flex-direction:column;gap:8px}.list.compact{padding:0 8px 8px}.item{position:relative;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-left:4px solid var(--pc,#4f46e5);border-radius:14px;padding:12px;box-shadow:0 2px 10px rgba(31,41,55,.04)}.ev-time{min-width:58px;font-size:12px;font-weight:800;color:#4b5563}.ev-body{min-width:0;flex:1}.ev-title{font-weight:750;font-size:14px;overflow-wrap:anywhere}.ev-detail{margin-top:4px;color:var(--muted);font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.chev{font-size:24px;color:#9ca3af}.cb{width:26px;height:26px;border:2px solid #cbd5e1;border-radius:9px;background:#fff;color:#fff;font-weight:900}.cb.checked{background:#16a34a;border-color:#16a34a}.is-done .ev-title{text-decoration:line-through;color:#9ca3af}.chip-daily{margin-left:8px;font-size:10px;font-weight:600;color:#6b7280;background:#f3f4f6;padding:2px 6px;border-radius:999px}.pin{border:0;background:transparent;opacity:.45;font-size:18px}.pin.on{opacity:1}.empty-hint{text-align:center;color:#6b7280;background:#fff;border:1px dashed #d1d5db;border-radius:14px;padding:18px;font-size:13px}.empty-hint .big{display:block;font-size:26px;margin-bottom:5px}.empty-hint .tip{font-size:11px;margin-top:4px;color:#9ca3af}.fam-head{display:flex;align-items:center;gap:9px;padding:13px}.fam-emoji{font-size:22px}.fam-count{margin-left:auto;font-size:11px;color:var(--muted)}.up-day{margin-bottom:12px}.up-date{font-size:12px;font-weight:800;color:#6b7280;margin:0 0 6px 4px}.owner-chip{color:#fff;border-radius:999px;font-size:10px;padding:2px 6px;margin-right:7px}.welcome{padding:14px}.welcome p{margin:5px 0 0;font-size:13px;color:#6b7280}.fab{position:fixed;right:20px;bottom:24px;z-index:25;border:0;width:58px;height:58px;border-radius:50%;background:#4f46e5;color:#fff;font-size:34px;box-shadow:0 10px 30px rgba(79,70,229,.35)}.overlay{position:fixed;inset:0;z-index:100;background:rgba(17,24,39,.46);display:flex;align-items:flex-end;justify-content:center}.sheet{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px 22px 0 0;padding:10px 16px max(20px,env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(0,0,0,.18)}.sheet-handle{width:42px;height:5px;border-radius:999px;background:#d1d5db;margin:1px auto 10px}.sheet-head{display:flex;justify-content:space-between;align-items:center}.sheet-head h3{margin:4px 0 12px}.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px;margin-bottom:12px}.seg button{border:1px solid var(--line);background:#f9fafb;border-radius:11px;padding:9px 6px;font-size:12px}.seg button.on{border-color:#818cf8;background:#eef2ff;color:#3730a3;font-weight:800}.owner-seg button.on{box-shadow:inset 0 0 0 2px var(--oc)}.field{margin-bottom:12px}.field label{display:block;font-size:12px;font-weight:700;margin-bottom:5px}.input{width:100%;border:1px solid #d1d5db;border-radius:11px;padding:11px 12px;background:#fff;outline:none}.input:focus{border-color:#818cf8;box-shadow:0 0 0 3px #eef2ff}textarea.input{min-height:100px;resize:vertical}.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check-row{display:flex;align-items:center;gap:8px;font-size:13px;margin:10px 0}.form-err{color:#dc2626;font-size:12px;min-height:18px}.sheet-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}.btn{border:0;border-radius:11px;padding:10px 13px;font-weight:750}.btn.primary{background:#4f46e5;color:#fff}.btn.ghost{background:#f3f4f6;color:#374151}.btn.danger{background:#fee2e2;color:#b91c1c}.confirm-card{width:min(420px,calc(100% - 28px));margin:auto;background:#fff;border-radius:18px;padding:18px}.confirm-card h4{margin:0 0 7px}.confirm-card p{color:#6b7280;font-size:13px}.set-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #f3f4f6;font-size:13px}.set-row span:last-child{text-align:right;color:#4b5563}.set-block{display:grid;gap:8px;margin-top:16px}.hint,.version-note{font-size:12px;color:#6b7280}.danger-text{margin-top:8px;border:0;background:transparent;color:#dc2626;padding:8px}.toast{position:fixed;z-index:200;left:50%;bottom:95px;transform:translateX(-50%);background:#111827;color:#fff;border-radius:999px;padding:10px 15px;font-size:13px;box-shadow:var(--shadow);max-width:90%;text-align:center}.modal-open{overflow:hidden}[hidden]{display:none!important}@media(max-width:520px){.sync-chip{max-width:145px}.sync-chip span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row2{grid-template-columns:1fr}.tabs{top:67px}.tab{font-size:10px}main{padding:12px}.person-head h2,.all-head h2{font-size:19px}}@media(min-width:761px){.overlay{align-items:center}.sheet{border-radius:22px;max-height:88vh}.fab{right:max(24px,calc((100vw - 760px)/2 + 16px))}}
