:root{color:#172426;background:#eef5f3;font-family:Inter,Noto Sans TC,PingFang TC,Microsoft JhengHei,system-ui,sans-serif;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px;background:#eef5f3}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.55}.app{width:min(1120px,100%);margin:0 auto;padding:18px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0 18px}h1,h2,h3,p{margin:0}h1{color:#102a2d;font-size:clamp(1.65rem,4vw,2.15rem);letter-spacing:0}.eyebrow{color:#587174;font-size:.88rem;font-weight:700}.tabs{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:8px 0 16px;background:#eef5f3}.tabs button,.segmented button,.surnameRail button,.iconButton,.exportButtons a,.exportButtons button{border:1px solid #c9d8d5;background:#fff;color:#172426;border-radius:8px;cursor:pointer}.tabs button{display:flex;align-items:center;justify-content:center;min-height:52px;gap:6px;color:#36575b;font-size:.98rem;font-weight:800}.tabs button.active,.segmented button.selected,.surnameRail button.active{background:#1f6f78;border-color:#1f6f78;color:#fff}.iconButton{display:grid;place-items:center;width:44px;height:44px}.workspace,.authPanel{background:#fff;border:1px solid #d8e6e2;border-radius:8px;padding:18px;box-shadow:0 8px 22px #19525812}.authPanel{max-width:440px;margin:10vh auto 0}.form,.addForm{display:grid;gap:12px;margin-top:20px}label{display:grid;gap:6px;color:#385557;font-size:1rem;font-weight:700}input,select,textarea{width:100%;min-height:52px;border:1px solid #c9d8d5;border-radius:8px;padding:12px 14px;background:#fff;color:#172426;font-size:1.05rem}textarea{min-height:92px;resize:vertical}input:disabled,select:disabled,textarea:disabled{background:#f2f6f5;color:#486265;opacity:1}.primary,.addForm button,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;border:0;border-radius:8px;background:#d9472b;color:#fff;font-weight:800;cursor:pointer}.secondary{border:1px solid #c9d8d5;background:#fff;color:#1f6f78}.error{color:#b3261e;font-weight:700}.success{margin:10px 0;color:#236b35;font-weight:700}.controlBand{display:grid;grid-template-columns:minmax(180px,.55fr) minmax(0,1.45fr);gap:14px;align-items:end}.dateField{color:#6a7d7f;font-size:.9rem}.dateField input{min-height:48px;color:#456164;background:#f8fbfa}.segmented{display:grid;grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:10px}.segmented button{min-height:56px;font-size:1.08rem;font-weight:800}.moreServicePanel{margin-top:12px;border:1px solid #d8e6e2;border-radius:8px;background:#f8fbfa;padding:12px}.dateQuick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}.dateQuick button{min-height:40px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#172426;font-weight:800;cursor:pointer}.searchBox{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:8px;margin:16px 0;border:1px solid #c9d8d5;border-radius:8px;padding:2px 14px;background:#fff}.searchBox input{border:0;padding-left:0;min-height:54px;font-size:1.1rem}.memberSearchBox{border-width:2px;padding:4px 14px}.memberSearchBox input{min-height:60px;font-size:1.22rem}.viewToggle{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:0 0 12px}.viewToggle button{min-height:48px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#172426;cursor:pointer;font-weight:900}.viewToggle button.active{background:#1f6f78;border-color:#1f6f78;color:#fff}.checkinWorkspace{--checkin-name-size: 1.18rem;--checkin-meta-size: .9rem;--checkin-tile-min: 90px;--checkin-tile-height: 58px;--checkin-prediction-size: 1.02rem;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation;padding-bottom:84px}.fontScale-small{--checkin-name-size: 1.08rem;--checkin-meta-size: .86rem;--checkin-tile-min: 72px;--checkin-tile-height: 48px;--checkin-prediction-size: .98rem}.fontScale-large{--checkin-name-size: 1.55rem;--checkin-meta-size: 1.08rem;--checkin-tile-min: 118px;--checkin-tile-height: 74px;--checkin-prediction-size: 1.28rem}.fontScale-xlarge{--checkin-name-size: 1.9rem;--checkin-meta-size: 1.18rem;--checkin-tile-min: 156px;--checkin-tile-height: 92px;--checkin-prediction-size: 1.48rem}.checkinWorkspace input,.checkinWorkspace select{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}.fontControl{display:grid;grid-template-columns:auto repeat(4,minmax(54px,1fr));gap:8px;align-items:center;margin:14px 0 0}.fontControl span{color:#587174;font-weight:900}.fontControl button{min-height:46px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#172426;cursor:pointer;font-weight:900}.fontControl button.active{background:#1f6f78;border-color:#1f6f78;color:#fff}.birthdayBox{display:grid;gap:10px;margin:14px 0;border:1px solid #d8e6e2;border-radius:8px;background:#fffdf7;padding:13px}.compactBirthday{margin-bottom:0}.birthdayHeader{display:flex;align-items:center;justify-content:space-between;gap:10px}.birthdayHeader strong{color:#9b5200;font-size:1rem}.birthdayList{display:flex;gap:10px;overflow-x:auto;padding-bottom:2px}.birthdayList span{flex:0 0 auto;display:grid;gap:3px;min-width:112px;border:1px solid #ead8a9;border-radius:8px;background:#fff;padding:10px 12px}.birthdayList b{color:#172426;font-size:1.05rem}.birthdayList em,.emptyBirthday{color:#8b6417;font-style:normal;font-weight:800;font-size:.92rem}.surnameRail{display:flex;gap:10px;overflow-x:auto;padding-bottom:10px}.stickySurnameBar{position:sticky;top:76px;z-index:2;margin:12px -4px 10px;padding:8px 4px 0;background:#fffffffa;border-bottom:1px solid #edf3f1;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.stickyFindBar{position:sticky;top:142px;z-index:1;margin:0 -4px 10px;padding:4px 4px 0;background:#fffffff5;border-bottom:1px solid #edf3f1;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.surnameRail button{flex:0 0 auto;min-width:58px;min-height:48px;font-size:1.05rem;font-weight:800}.statsLine{display:flex;gap:10px;flex-wrap:wrap;margin:6px 0 16px}.statsLine span,.metric{border:1px solid #d8e6e2;border-radius:8px;background:#f8fbfa;padding:11px 13px;color:#385557;font-weight:800;font-size:1rem}.floatingServiceCount{position:fixed;right:16px;bottom:16px;z-index:3;min-width:128px;border:1px solid #bcd5d0;border-radius:8px;background:#102a2d;color:#fff;box-shadow:0 8px 22px #102a2d2e;padding:12px 16px;text-align:center;font-size:1.1rem;font-weight:900}.checkinOverviewGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--checkin-tile-min),1fr));gap:8px}.checkinOverviewButton{display:grid;place-items:center;min-height:var(--checkin-tile-height);border:1px solid #d9e6e3;border-radius:8px;background:#fff;color:#172426;padding:7px 5px;text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.checkinOverviewButton strong{display:block;font-size:var(--checkin-name-size);line-height:1.15}.checkinOverviewButton em{display:none}.checkinOverviewButton.checked{border-color:#2d8a57;background:#e8f7ee}.checkinOverviewButton.otherService{border-color:#dba63a;background:#fff7df}.checkinOverviewButton.holding{border-color:#1f6f78;background:#dff3f6}.memberList{display:grid;gap:10px}.memberOverviewGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:7px}.overviewMemberButton{display:grid;place-items:center;min-height:44px;border:1px solid #d9e6e3;border-radius:8px;background:#fff;color:#172426;padding:6px 5px;cursor:pointer;text-align:center;touch-action:manipulation}.overviewMemberButton strong{display:block;font-size:1rem;line-height:1.15}.overviewMemberButton em,.overviewMemberButton .statusPill{display:none}.predictionBox{border:1px solid #d8e6e2;border-radius:8px;background:#f4faf8;padding:14px;margin:0 0 14px}.collapsedPrediction{padding-bottom:10px}.predictionToggle{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;border:0;background:transparent;color:#172426;cursor:pointer;padding:0;font-weight:900}.predictionToggle b{color:#1f6f78}.predictionList{display:flex;gap:10px;overflow-x:auto;padding-top:10px}.predictionList button{flex:0 0 auto;min-height:48px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#172426;font-size:var(--checkin-prediction-size);font-weight:800;cursor:pointer;padding:0 14px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.memberRow{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:var(--checkin-row-height, 72px);width:100%;border:1px solid #d9e6e3;border-radius:8px;background:#fff;color:#172426;padding:13px 14px;text-align:left;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.memberRow strong{display:block;font-size:var(--checkin-name-size, 1.18rem);line-height:1.35}.memberRow em{display:inline-block;margin-top:3px;color:#9b5200;font-size:var(--checkin-meta-size, .9rem);font-style:normal;font-weight:800}.memberRow b{flex:0 0 auto;min-width:82px;text-align:center;color:#1f6f78;font-size:var(--checkin-action-size, 1.02rem);line-height:1.25}.memberRow.checked{border-color:#2d8a57;background:#e8f7ee}.memberRow.holding{border-color:#1f6f78;background:#dff3f6}.memberRow.otherService{border-color:#dba63a;background:#fff7df}.statusFilter,.statusButtons{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.statusFilter button,.statusButtons button,.dangerButton{min-height:44px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#172426;font-weight:800;cursor:pointer;padding:0 12px}.statusFilter button.active,.statusButtons button.active{background:#1f6f78;border-color:#1f6f78;color:#fff}.statusPill{margin-right:6px;color:#6c4b00}.status-left{color:#82620c}.status-deceased{color:#7a3d48}.status-guest_speaker{color:#4d5aa3}.detailHeader{display:flex;justify-content:space-between;gap:12px;align-items:start}.contactLine{margin-top:4px;color:#587174;font-size:.95rem;font-weight:700;line-height:1.45}.memberDetailContent{display:grid;gap:16px}.mobileBackButton{display:inline-flex;align-items:center;justify-content:center;min-height:52px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#1f6f78;font-weight:900;cursor:pointer}.memberDetailPage{width:min(980px,100%);margin:0 auto}.detailSection{display:grid;gap:10px}.detailSection h3{color:#102a2d;font-size:1.05rem}.profileForm{display:grid;grid-template-columns:minmax(120px,.6fr) minmax(150px,.75fr) minmax(180px,1fr);gap:10px;align-items:end;border:1px solid #dce7e4;border-radius:8px;background:#f8fbfa;padding:12px}.nameManageForm{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:10px;align-items:end;border:1px solid #dce7e4;border-radius:8px;background:#f8fbfa;padding:12px}.nameManageForm input,.profileForm input,.profileForm select{min-height:48px}.profileForm label:nth-of-type(4),.profileForm label:nth-of-type(5),.profileForm button{grid-column:1 / -1}.detailStatusGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.detailStatusGrid button{min-height:54px;border:1px solid #c9d8d5;border-radius:8px;background:#fff;color:#172426;font-weight:900;cursor:pointer}.detailStatusGrid button.active{border-color:#1f6f78;background:#1f6f78;color:#fff}.detailCardRow{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;border:1px solid #dce7e4;border-radius:8px;background:#f8fbfa;padding:12px}.detailCardRow strong{display:block;color:#172426;font-size:1.08rem}.detailCardRow em{display:inline-block;margin-top:3px;color:#82620c;font-style:normal;font-weight:800}.detailCardRow b{flex:0 0 auto;color:#1f6f78}.inlineRelationshipForm{display:grid;grid-template-columns:minmax(180px,1fr) minmax(140px,.6fr) auto;gap:10px;align-items:end;border:1px solid #dce7e4;border-radius:8px;background:#f8fbfa;padding:12px}.inlineRelationshipForm input,.inlineRelationshipForm select{min-height:46px}.emptyState{border:1px dashed #c9d8d5;border-radius:8px;background:#f8fbfa;padding:16px;color:#587174;font-weight:800}.twoCol{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:16px}.membersDetailOpen .memberSearchPane{display:none}.settingsGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.settingsGrid section{display:grid;gap:12px;align-content:start}.fullRow{grid-column:1 / -1}.compactForm{margin-top:0}.chipList{display:flex;flex-wrap:wrap;gap:8px}.chipList span{border:1px solid #dce7e4;border-radius:8px;background:#f8fbfa;padding:8px 10px;font-weight:800}.familyEditor{display:grid;grid-template-columns:1fr 1fr minmax(180px,1fr) auto;gap:10px}.relationshipEditor{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr)) minmax(150px,.8fr) auto;gap:12px;align-items:end}.familyList{display:grid;gap:10px;border:1px solid #dce7e4;border-radius:8px;padding:12px;background:#f8fbfa}.familyRow{display:grid;grid-template-columns:minmax(160px,1fr) minmax(120px,.65fr) minmax(140px,.75fr) auto;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #e6efec}.familyRow:first-of-type{border-top:0}.familyRow strong{display:block}.familyRow input{min-height:44px}.dangerButton{background:#fff4f1;border-color:#efc2b7;color:#9d321c}.treeActions{margin:10px 0}.treePreview{overflow-x:auto;border:1px solid #dce7e4;border-radius:8px;background:#f8fbfa;padding:10px;margin:8px 0 16px}.treePreview svg{display:block;width:min(900px,100%);min-width:620px;height:auto}.treeNode{cursor:grab;touch-action:none}.treeNode:active{cursor:grabbing}.treeTitle{font:700 28px system-ui,Noto Sans TC,Microsoft JhengHei,sans-serif;fill:#102a2d;text-anchor:middle}.treeSection{font:700 18px system-ui,Noto Sans TC,Microsoft JhengHei,sans-serif;fill:#385557}.treeName{font:800 21px system-ui,Noto Sans TC,Microsoft JhengHei,sans-serif;fill:#172426;text-anchor:middle}.treeDetail,.treeEdge{font:700 15px system-ui,Noto Sans TC,Microsoft JhengHei,sans-serif;fill:#587174;text-anchor:middle}.treeMeta{font:700 13px system-ui,Noto Sans TC,Microsoft JhengHei,sans-serif;fill:#7a8e90;text-anchor:middle}.treeLine{stroke:#9dbcb7;stroke-width:2}.treeEdgeBg{fill:#fff;stroke:#d7e5e2;stroke-width:1}.addForm{grid-template-columns:minmax(0,1fr) minmax(100px,.42fr) minmax(150px,.65fr) auto;margin-top:0}.detailPane{border-left:1px solid #dce7e4;padding-left:16px}.historyRow{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #edf2f0}.reportHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0}.reportServiceFilter{margin-top:12px;max-width:320px}.exportButtons{display:flex;flex-wrap:wrap;gap:8px}.exportButtons a,.exportButtons button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;text-decoration:none}.metricGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}.metric{display:grid;gap:6px}.metric strong{color:#172426;font-size:1.6rem}.tableWrap{overflow-x:auto;margin-top:14px}.tableWrap h3{margin:0 0 8px;font-size:1rem}table{width:100%;border-collapse:collapse;min-width:680px}th,td{padding:10px;border-bottom:1px solid #edf2f0;text-align:left}th{color:#4f7274;font-size:.86rem}.loading{padding:30vh 0;text-align:center;font-weight:800}@media(max-width:720px){.app{padding:10px}.workspace,.authPanel{padding:14px}.controlBand,.twoCol,.addForm,.reportHeader,.settingsGrid,.familyEditor,.relationshipEditor,.inlineRelationshipForm,.profileForm,.nameManageForm,.familyRow{grid-template-columns:1fr;display:grid}.detailStatusGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.stickySurnameBar{top:82px;margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px}.stickyFindBar{top:148px;margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px}.detailPane{border-left:0;border-top:1px solid #dce7e4;padding-left:0;padding-top:12px}.membersDetailOpen{display:block}.membersDetailOpen .memberSearchPane{display:none}.membersDetailOpen .detailPane{border-top:0;padding-top:0}.membersWorkspace:not(.membersDetailOpen) .detailPane{display:none}.mobileBackButton{position:sticky;top:82px;z-index:1;display:block}.detailHeader{align-items:center;border-bottom:1px solid #edf2f0;padding-bottom:12px}.detailHeader h2{font-size:1.8rem}.detailStatusGrid{grid-template-columns:1fr}.detailStatusGrid button,.treeActions button{min-height:58px;font-size:1.08rem}.detailCardRow{min-height:66px;padding:14px}.metricGrid{grid-template-columns:repeat(2,1fr)}.tabs button{min-height:56px;font-size:.95rem;flex-direction:column;gap:3px}.memberRow{min-height:76px}.memberRow strong{font-size:var(--checkin-name-size)}.fontControl{grid-template-columns:1fr repeat(4,minmax(50px,1fr))}.memberSearchBox{position:sticky;top:82px;z-index:2;background:#fff}.checkinSearchDock{position:fixed;left:10px;bottom:10px;z-index:4;width:min(56vw,230px);margin:0;box-shadow:0 8px 22px #102a2d29}.checkinSearchDock:focus-within{inset:82px 10px auto;width:auto}.checkinSearchDock input{min-height:46px;font-size:1rem}.checkinOverviewGrid{grid-template-columns:repeat(auto-fill,minmax(var(--checkin-tile-min),1fr));gap:6px}.checkinOverviewButton{min-height:var(--checkin-tile-height);padding:5px 3px}.checkinOverviewButton strong{font-size:var(--checkin-name-size)}.memberOverviewGrid{grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px}.overviewMemberButton{min-height:38px;padding:5px 3px}.overviewMemberButton strong{font-size:.9rem}.floatingServiceCount{right:10px;bottom:10px;min-width:112px;padding:10px 12px;font-size:1rem}}@media print{.tabs,.topbar,.controlBand,.exportButtons{display:none}.app,.workspace{width:100%;padding:0;border:0;box-shadow:none}}
