body.intake-mode {
  background: #f3f6f4;
  color: #193c33;
}
body.intake-mode #sidebar, body.intake-mode #topbar, body.intake-mode #shade { display: none; }
body.intake-mode .workspace { margin: 0; }
body.intake-mode #main { max-width: none; padding: 0; }
body.intake-mode.in-sheet-open { overflow: hidden; }

.in-app {
  --in-ink: #183b32;
  --in-green: #17644e;
  --in-deep: #11533e;
  --in-muted: #64766e;
  --in-line: #dce6de;
  --in-mint: #e7f3e9;
  min-height: 100dvh;
  background: #f3f6f4;
  color: var(--in-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.in-app *, .in-app *::before, .in-app *::after { box-sizing: border-box; }
.in-app button, .in-app input, .in-app textarea { font: inherit; }
.in-app button { color: inherit; }
.in-app :is(button,input,textarea):focus-visible { outline: 2px solid #42866a; outline-offset: 3px; }
.in-app button { -webkit-tap-highlight-color: transparent; }
.in-app :is(h1,h2,h3,p,dl,dd) { margin: 0; }
.in-wrap { width: min(calc(100% - 64px), 1016px); margin-inline: auto; }
.in-bar { background: #fff; border-bottom: 1px solid var(--in-line); }
.in-bar-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.in-brand, .in-back, .in-day, .in-scope, .in-card-head, .in-field-heading, .in-text, .in-member-room, .in-switch, .in-form h2, .in-side-card h2, .in-brand-mark, .in-submit, .in-primary, .in-secondary, .in-new, .in-record-icon, .in-scope-info, .in-search, .in-success { display: flex; align-items: center; }
.in-brand { gap: 10px; white-space: nowrap; }
.in-brand-mark { justify-content: center; width: 35px; height: 35px; background: var(--in-green); border-radius: 11px; color: white; }
.in-brand strong { font-size: 21px; letter-spacing: 1px; font-weight: 750; }
.in-brand-line { width: 1px; height: 16px; background: #cbd9cf; margin: 0 2px; }
.in-brand > span:last-child { font-size: 13px; color: #5b7066; font-weight: 550; }
.in-back { gap: 6px; font-size: 13px; color: var(--in-muted); padding: 8px 11px; border-radius: 8px; }
.in-back:hover { background: #eff5ef; }
.in-content { padding: 23px 0 45px; }
.in-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 178px; display: flex; align-items: center; padding: 22px clamp(22px,4vw,40px); border-radius: 20px; background: #d9e9dd; }
.in-hero::before { content: ""; position: absolute; inset: 0 0 0 40%; z-index: -2; background: url("./assets/intake-visit.webp") 65% 20% / cover no-repeat; }
.in-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#dcecdf 2%,#dcecdf 40%,#dcecdfbb 47%,#dcecdf20 59%,transparent 70%); }
.in-hero-copy { position: relative; }
.in-day { gap: 7px; color: #3e6953; font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.in-hero h1 { margin: 6px 0 11px; font-size: clamp(31px,3.7vw,43px); line-height: 1.2; letter-spacing: -.045em; font-weight: 750; color: #163f2f; }
.in-scope { width: fit-content; gap: 5px; font-size: 12px; font-weight: 600; color: #355a46; }
.in-hero .in-scope { padding: 4px 10px; border: 1px solid #ffffff98; border-radius: 20px; background: #ffffff6b; }
.in-layout { display: grid; grid-template-columns: minmax(0,1.95fr) minmax(268px,1fr); align-items: start; gap: 18px; margin-top: 18px; }
.in-main, .in-aside { min-width: 0; display: grid; gap: 14px; align-content: start; }
.in-panel { border: 1px solid var(--in-line); background: #fff; border-radius: 16px; box-shadow: 0 2px 6px #17382804; }
.in-member { width: 100%; text-align: left; display: flex; align-items: center; gap: 13px; padding: 14px 20px; }
.in-member:hover, .in-profile:hover { border-color: #a7c3ad; background: #fcfefb; }
.in-avatar { width: 46px; height: 46px; flex: none; object-fit: cover; object-position: 50% 37%; border-radius: 50%; background: #e9f1e8; }
.in-initial { display: grid; place-items: center; font-size: 18px; color: var(--in-green); }
.in-member-copy small, .in-profile small, .in-detail-person small, .in-choice small { display: block; color: var(--in-muted); font-size: 12px; }
.in-member-copy strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; font-size: 20px; line-height: 1.5; }
.in-member-copy strong span { font-size: 12px; font-weight: 450; color: #63756c; }
.in-member-room { gap: 4px; margin-left: auto; color: var(--in-muted); white-space: nowrap; font-size: 12px; }
.in-switch { color: var(--in-green); font-size: 13px; font-weight: 600; gap: 4px; margin-left: 2px; padding-left: 14px; border-left: 1px solid var(--in-line); white-space: nowrap; }
.in-form, .in-records { padding: 21px 23px 23px; scroll-margin-top: 12px; }
.in-app h2 { font-size: 18px; letter-spacing: -.02em; line-height: 1.45; }
.in-types { display: flex; gap: 3px; background: #f0f4f0; border-radius: 10px; padding: 4px; margin: 14px 0 19px; }
.in-types button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 14px; min-height: 37px; color: var(--in-muted); border-radius: 7px; }
.in-types button[aria-pressed="true"] { background: var(--in-green); color: #fff; box-shadow: 0 1px 3px #133b2b18; }
.in-field-heading, .in-card-head { justify-content: space-between; gap: 10px; }
.in-field-heading { margin-bottom: 9px; }
.in-field-heading h3, .in-field > span, .in-detail-note h3 { font-size: 14px; font-weight: 650; }
.in-field-heading h3 small, .in-field > span small { color: var(--in-muted); font-size: 12px; font-weight: 400; margin-left: 4px; }
.in-app .in-text { gap: 4px; color: var(--in-green); font-weight: 570; font-size: 12px; padding: 5px 0 5px 6px; }
.in-text:hover { text-decoration: underline; }
.in-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.in-metric { min-width: 0; border: 1px solid #dde6df; border-radius: 11px; padding: 11px 13px 7px; background: #fdfefd; }
.in-metric:focus-within { border-color: #5c9a78; box-shadow: 0 0 0 2px #267d5420; }
.in-metric-label { display: flex; align-items: center; gap: 7px; }
.in-metric-label b { font-size: 13px; }
.in-metric-label small { color: #697c71; font-size: 11px; margin-left: auto; font-weight: 500; }
.in-metric-label i, .in-role-icon, .in-profile-icon { display: inline-grid; place-items: center; border-radius: 7px; }
.in-metric-label i { width: 25px; height: 25px; }
.in-hr i { color: #bf5a55; background: #f9e9e6; }
.in-bp i { color: #6e75a9; background: #edeef9; }
.in-o2 i { color: #358b9a; background: #e2f3f4; }
.in-wt i { color: #af7935; background: #fcf0dc; }
.in-metric-input { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.in-metric-input > span { color: #a8b5ac; }
.in-metric-input input { text-align: left; width: 100%; min-width: 0; border: 0; border-radius: 3px; appearance: textfield; background: transparent; color: var(--in-ink); font-size: 18px; font-weight: 600; height: 31px; padding: 0 1px; font-variant-numeric: tabular-nums; }
.in-metric-input input::-webkit-inner-spin-button, .in-metric-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.in-metric-input input:focus-visible { outline: none; }
.in-metric-input input::placeholder { font-size: 14px; color: #87978e; font-weight: 400; }
.in-categories { display: flex; flex-wrap: wrap; gap: 7px; }
.in-categories button { border: 1px solid var(--in-line); padding: 6px 13px; border-radius: 8px; font-size: 13px; color: #60736a; min-height: 34px; }
.in-categories button[aria-pressed="true"] { background: var(--in-mint); color: var(--in-deep); border-color: #afd0b9; font-weight: 650; }
.in-field-stack { display: grid; gap: 14px; margin-top: 18px; }
.in-field { display: grid; gap: 7px; min-width: 0; }
.in-field input, .in-field textarea, .in-search input { min-width: 0; width: 100%; color: var(--in-ink); }
.in-field input, .in-field textarea { border: 1px solid var(--in-line); border-radius: 8px; background: #fcfdfb; padding: 9px 11px; }
.in-field input { min-height: 40px; }
.in-date-control { display: block; position: relative; }
.in-date-display { position: absolute; inset: 1px 34px 1px 2px; display: flex; align-items: center; padding-left: 10px; background: #fcfdfb; pointer-events: none; font-size: 14px; font-weight: 450; font-variant-numeric: tabular-nums; border-radius: 7px; }
.in-date-control:focus-within .in-date-display { visibility: hidden; }
.in-field textarea { min-height: 63px; resize: vertical; }
.in-field textarea::placeholder, .in-search input::placeholder { color: #839289; }
.in-submit, .in-primary, .in-secondary, .in-new { justify-content: center; gap: 7px; font-weight: 650; padding: 10px 18px; border-radius: 9px; min-height: 42px; }
.in-app .in-submit, .in-app .in-primary, .in-app .in-save-mobile, .in-app .in-new { background: var(--in-green); color: #fff; }
.in-submit { margin-top: 17px; width: 100%; }
.in-submit:hover, .in-primary:hover, .in-save-mobile:hover, .in-new:hover { background: var(--in-deep); }
.in-app .in-error { margin-top: 12px; color: #9a4837; background: #fff4ef; border-radius: 8px; padding: 9px 12px; }
.in-side-card { padding: 18px; }
.in-side-card h2 { font-size: 16px; gap: 8px; }
.in-side-card h2 .ico { color: var(--in-green); }
.in-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.in-side-card .in-roles { margin-top: 16px; }
.in-roles button { display: flex; align-items: center; gap: 7px; text-align: left; border: 1px solid var(--in-line); border-radius: 10px; padding: 10px 8px; }
.in-roles button[aria-pressed="true"] { border-color: #84b395; background: #ebf5ec; }
.in-roles button b, .in-profile strong { display: block; font-size: 14px; font-weight: 650; }
.in-roles button small { display: block; font-size: 12px; color: var(--in-muted); }
.in-role-icon { color: #5a7565; width: 27px; flex: none; }
.in-roles button[aria-pressed="true"] .in-role-icon { color: var(--in-green); }
.in-roles i { margin-left: auto; display: grid; align-self: flex-start; place-items: center; width: 13px; height: 13px; border-radius: 50%; border: 1px solid #ced9d0; }
.in-roles button[aria-pressed="true"] i { background: var(--in-green); border-color: var(--in-green); color: #fff; }
.in-empty { display: grid; justify-items: center; gap: 4px; color: var(--in-muted); text-align: center; padding: 28px 6px 18px; }
.in-empty > .ico { color: #69917b; margin-bottom: 8px; }
.in-empty b { color: #4e6657; font-size: 14px; }
.in-empty span { font-size: 12px; }
.in-rows { display: grid; }
.in-side-card .in-rows { margin-top: 7px; }
.in-row { display: flex; align-items: center; min-width: 0; gap: 9px; text-align: left; padding: 13px 0; }
.in-row:last-child { padding-bottom: 3px; }
.in-row + .in-row { border-top: 1px solid #eaf0e9; }
.in-row:hover .in-row-copy strong { color: var(--in-green); }
.in-record-icon { color: #3d795c; background: #e9f4e8; width: 34px; height: 34px; justify-content: center; border-radius: 9px; flex: none; }
.in-record-icon.in-observe { color: #97713a; background: #faf0dd; }
.in-row-copy { flex: 1; min-width: 0; }
.in-row-copy strong, .in-row-copy small, .in-row-copy time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-row-copy strong { font-size: 14px; }
.in-row-copy strong span { color: #5d7265; font-size: 11px; margin-left: 7px; font-weight: 500; }
.in-row-copy small { color: #5b6b61; font-size: 12px; margin: 2px 0; }
.in-row-copy time { color: #718077; font-size: 11px; }
.in-row > .ico, .in-profile > .ico { color: #73907f; flex: none; }
.in-profile { display: flex; gap: 12px; align-items: center; padding: 16px 18px; text-align: left; }
.in-profile-icon { width: 40px; height: 40px; background: #edf3e9; color: #4e795a; flex: none; }
.in-profile > .ico { margin-left: auto; }
.in-record-count { font-size: 12px; color: var(--in-muted); }
.in-record-filter { margin: 12px 0 8px; }
.in-mobile-role, .in-bottom { display: none; }

.in-sheet { color: var(--in-ink); width: min(440px,calc(100% - 32px)); max-height: min(78dvh,740px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--in-line); border-radius: 19px; padding: 22px; box-shadow: 0 18px 60px #16362630; }
.in-sheet::backdrop { background: #10291e65; }
.in-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.in-close { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #eff4ef; }
.in-scope-info { gap: 8px; margin-bottom: 11px; color: var(--in-muted); font-size: 12px; }
.in-search { border: 1px solid var(--in-line); background: #f6f9f5; border-radius: 9px; color: var(--in-muted); padding: 0 10px; gap: 7px; }
.in-search input { border: 0; outline: 0; background: transparent; padding: 9px 0; }
.in-choices { margin-top: 10px; }
.in-choice { display: flex; width: 100%; min-width: 0; gap: 11px; align-items: center; text-align: left; padding: 9px; border-radius: 10px; }
.in-choice[aria-pressed="true"] { background: #edf5ed; }
.in-choice > .ico { margin-left: auto; color: var(--in-green); }
.in-choice .in-avatar { width: 39px; height: 39px; }
.in-no-match { padding: 20px 10px; color: var(--in-muted); text-align: center; }
.in-detail-person { display: flex; align-items: center; gap: 10px; }
.in-detail-person strong { font-size: 16px; }
.in-detail-person > b { margin-left: auto; white-space: nowrap; background: var(--in-mint); color: var(--in-green); font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.in-app .in-details { margin-top: 16px; }
.in-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--in-line); }
.in-details dt, .in-details small { color: var(--in-muted); }
.in-details dd { font-weight: 550; text-align: right; }
.in-detail-note { background: #f3f7f1; padding: 10px 12px; border-radius: 9px; margin-top: 12px; }
.in-detail-note p { color: #506658; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.in-detail-actions { display: flex; gap: 9px; margin-top: 20px; }
.in-detail-actions button { flex: 1; }
.in-secondary { border: 1px solid var(--in-line); }
.in-app .in-success { gap: 6px; background: #eaf5e9; color: var(--in-green); padding: 9px 11px; border-radius: 8px; margin-bottom: 16px; }
@media (min-width: 1000px) {
  .in-form:has([name="hr"]) .in-field-stack { grid-template-columns: 0.95fr 1.3fr; align-items: start; }
  .in-form:has([name="hr"]) textarea { height: 42px; min-height: 42px; }
}
@media (max-width: 740px) {
  .in-wrap { width: min(calc(100% - 32px),580px); }
  .in-bar-inner { min-height: 54px; }
  .in-brand { gap: 8px; }
  .in-brand strong { font-size: 18px; }
  .in-brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .in-brand-mark .ico { width: 22px; }
  .in-back { padding: 6px 0 6px 5px; font-size: 12px; }
  .in-content { padding: 14px 0 calc(90px + env(safe-area-inset-bottom)); }
  .in-hero { min-height: clamp(138px,32vw,168px); padding: 17px 20px; border-radius: 15px; }
  .in-hero::before { inset: 0 0 0 10%; background-position: 65% 33%; }
  .in-hero::after { background: linear-gradient(90deg,#dcecdf 2%,#dcecdfe8 29%,#dcecdfb5 42%,#dcecdf00 64%); }
  .in-day { gap: 5px; font-size: 11px; }
  .in-hero h1 { margin: 7px 0 8px; font-size: 32px; }
  .in-hero .in-scope { font-size: 11px; }
  .in-layout { display: block; margin-top: 12px; }
  .in-main { gap: 0; }
  .in-aside { display: none; }
  .in-member { padding: 12px 14px; gap: 9px; border-radius: 13px; }
  .in-member-copy strong { font-size: 18px; gap: 6px; }
  .in-member-copy small, .in-member-copy strong span { font-size: 11px; }
  .in-member .in-avatar { width: 41px; height: 41px; }
  .in-member-room { font-size: 11px; }
  .in-switch { font-size: 12px; padding-left: 8px; }
  .in-mobile-role { display: flex; justify-content: flex-end; align-items: center; gap: 6px; color: var(--in-muted); font-size: 12px; min-height: 37px; justify-self: end; padding: 4px 3px; }
  .in-mobile-role b { color: var(--in-green); font-weight: 600; }
  .in-form, .in-records { padding: 16px; border-radius: 14px; }
  .in-app h2 { font-size: 17px; }
  .in-types { margin: 11px 0 14px; }
  .in-types button { min-height: 34px; }
  .in-field-heading h3 small { font-size: 11px; }
  .in-metrics { gap: 8px; }
  .in-metric { padding: 9px 10px 6px; }
  .in-metric-input input, .in-field input, .in-field textarea, .in-search input { font-size: 16px; }
  .in-metric-input input::placeholder { font-size: 13px; }
  .in-metric-label { gap: 5px; }
  .in-metric-label i { width: 23px; height: 23px; }
  .in-submit, .in-new { display: none; }
  .in-bottom { display: flex; align-items: center; gap: 5px; position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: 8px max(16px,calc((100% - 560px)/2)) calc(8px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid var(--in-line); backdrop-filter: blur(8px); }
  .in-bottom button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; min-height: 42px; min-width: 48px; width: 19%; border-radius: 8px; color: #64766d; }
  .in-bottom button[aria-current="page"] { color: var(--in-green); font-weight: 700; }
  .in-bottom .in-save-mobile { flex: 1; margin-left: 12px; flex-direction: row; gap: 7px; min-height: 43px; font-size: 15px; font-weight: 650; }
  .in-sheet { width: min(100%,580px); max-width: none; margin: auto auto 0; border-radius: 20px 20px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); }
  .in-sheet-handle { width: 34px; height: 4px; border-radius: 5px; background: #cfdad2; margin: 0 auto 12px; }
}
@media (max-width: 375px) {
  .in-wrap { width: calc(100% - 20px); }
  .in-brand-line { margin: 0; }
  .in-member { gap: 7px; padding: 10px; }
  .in-member-room .ico { display: none; }
  .in-form, .in-records { padding: 13px; }
  .in-metric { padding-inline: 8px; }
  .in-metric-input { gap: 3px; }
  .in-metric-label small { font-size: 10px; }
}
