.parttime-portal {
  --canvas: #fcf5e7;
  --paper: #fffdf7;
  --ink: #372d26;
  --muted: #706154;
  --muted-strong: #5f5145;
  --line: #e8dbc5;
  --soft-line: #f0e6d6;
  --accent: #89602e;
  --accent-deep: #684721;
  --accent-wash: #fff1d1;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 92% 2%, #fbe2a9a6, transparent 43%),
    radial-gradient(ellipse at 6% 84%, #cfe6ecab, transparent 60%), #fff9eb;
}
.parttime-shell { display: flex; flex-direction: column; width: min(100%, 790px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 0 14px max(14px, env(safe-area-inset-bottom)); }
.parttime-portal .sr-only { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; margin: -1px; padding: 0 !important; overflow: hidden; border: 0 !important; clip-path: inset(50%); white-space: nowrap; }
.parttime-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 65px; padding: 8px 2px; }
.parttime-brand, #parttime-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.parttime-brand strong { color: var(--ink); font-size: 15px; line-height: 1.35; }
.parttime-mark, .parttime-welcome-icon { flex: none; border: 1px solid #e9d7b6; border-radius: 11px; }
.parttime-mark { display: block; width: 37px; height: 37px; object-fit: cover; background: var(--paper); }
.parttime-welcome-icon { display: grid; place-items: center; background: linear-gradient(155deg, #fff9e8, #f7db9c); color: var(--accent-deep); }
.parttime-main { display: grid; flex: 1; align-content: center; min-width: 0; }
.parttime-main.is-workspace { align-content: start; }
.parttime-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid #fffd; border-radius: 13px; background: #fffaf0e8; box-shadow: 0 0 0 1px #82623a26; }
.parttime-nav button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 6px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted-strong); font-weight: 650; }
.parttime-nav button[aria-current="page"] { border-color: #ebd9ae; background: #ffefc9; color: var(--accent-deep); }
.parttime-nav .icon { width: 17px; height: 17px; }
.parttime-unread-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 999px; background: #cf1833; color: white; font-size: 10px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.parttime-nav [data-parttime="chat"] { gap: 4px; }
.parttime-nav [data-parttime="chat"] .icon { flex-shrink: 0; }
.parttime-notice { margin-bottom: 9px; padding: 7px 11px; border: 1px solid #d5e6e8; border-radius: 9px; background: #eef7f8; color: #3f6066; font-size: 13px; overflow-wrap: anywhere; }
.parttime-task-list, .parttime-task-detail, .parttime-task-items { display: grid; gap: 9px; min-width: 0; }
.parttime-task-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.parttime-task-header h1, .parttime-task-panel h1 { color: var(--ink); font: 700 clamp(23px, 5vw, 30px)/1.27 var(--heading-font); overflow-wrap: anywhere; }
.parttime-task-header p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.parttime-task-list > .btn { justify-self: start; }
.parttime-overview { gap: 12px; }
.parttime-overview .parttime-task-header { align-items: flex-start; padding: 5px 3px 1px; }
.parttime-overview .parttime-task-header .btn { flex: none; min-height: 39px; border-radius: 12px; }
.parttime-overview .parttime-task-header h1 { font-family: inherit; font-size: clamp(23px, 5vw, 29px); }
.parttime-overview :is(.parttime-date-filter, .parttime-lead-upload, .parttime-lead-card, .parttime-lead-daily, .parttime-result-summary, .parttime-result-card, .parttime-task-item, .parttime-task-empty) {
  box-shadow: 0 0 0 1px #82623a20, 0 3px 12px #694b220b;
}
.parttime-date-filter { display: grid; gap: 6px; min-width: 0; padding: 10px; border-radius: 16px; }
.parttime-date-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 12px; background: #f5eddb; }
.parttime-date-presets .btn { min-height: 36px; padding-inline: 2px; border-color: transparent; border-radius: 9px; font-size: 13px; white-space: nowrap; }
.parttime-date-presets .btn[aria-pressed="true"] { background: var(--paper); color: var(--accent-deep); box-shadow: 0 1px 4px #6348201a; }
.parttime-custom-dates summary { display: flex; align-items: center; gap: 8px; min-height: 28px; padding-inline: 4px; color: var(--muted-strong); font-size: 12px; cursor: pointer; list-style: none; }
.parttime-custom-dates summary::-webkit-details-marker { display: none; }
.parttime-custom-dates summary::after { width: 6px; height: 6px; margin-left: auto; margin-right: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); content: ''; }
.parttime-custom-dates[open] summary::after { transform: rotate(225deg); }
.parttime-custom-dates summary small { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.parttime-custom-dates[open] summary::after { margin-left: 0; }
.parttime-date-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; padding-top: 5px; }
.parttime-date-inputs input[type="date"] { display: block; width: 100%; min-width: 0; min-height: 42px; padding-inline: 6px; border-color: var(--line); border-radius: 10px; font-size: 14px; }
.parttime-date-inputs .btn { min-height: 42px; padding-inline: 10px; border-radius: 10px; white-space: nowrap; }
.parttime-lead-upload { display: grid; gap: 10px; padding: 10px; border-radius: 16px; }
.parttime-lead-picker { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 62px; padding: 9px; border: 1px dashed #decda7; border-radius: 12px; background: #fff9ec; cursor: pointer; }
.parttime-lead-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.parttime-lead-picker.is-disabled { opacity: .65; cursor: default; }
.parttime-lead-picker-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e6f1f3; color: #416069; }
.parttime-lead-picker-copy, .parttime-lead-card-copy { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.parttime-lead-picker-copy small, .parttime-lead-card-copy small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.parttime-lead-picker-action, .parttime-lead-view { color: var(--accent-deep); font-size: 12px; font-weight: 650; white-space: nowrap; }
.parttime-lead-picker-action { padding: 4px 9px; border-radius: 999px; background: var(--accent-wash); }
.parttime-lead-upload > .btn { min-height: 40px; border-radius: 11px; }
.parttime-lead-daily { min-width: 0; padding: 13px; border-radius: 16px; }
.parttime-lead-daily h2, .parttime-lead-items h2 { margin: 0 0 4px; font-size: 15px; }
.parttime-lead-daily table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.parttime-lead-daily :is(th, td) { padding: 7px 3px; border-top: 1px solid var(--soft-line); white-space: nowrap; }
.parttime-lead-daily th:first-child { text-align: left; }
.parttime-lead-daily th { color: var(--muted-strong); font-weight: 600; }
.parttime-lead-daily strong { color: #2d6850; }
.parttime-lead-items { display: grid; gap: 8px; }
.parttime-lead-card { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px; border-radius: 14px; text-align: left; }
.parttime-lead-thumbnail { width: 55px; height: 61px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f2ebdc; }
.parttime-lead-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.parttime-lead-invalid { background: #fff0ed; color: #963632; }
.parttime-leads .parttime-result-summary > div:first-child dd { color: #2d6850; }

@media (max-width: 380px) {
  .parttime-date-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parttime-date-inputs .btn { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .parttime-nav button { flex-direction: column; gap: 3px; padding-inline: 2px; font-size: 12px; }
  .parttime-nav [data-parttime="chat"] { position: relative; gap: 3px; }
  .parttime-nav [data-parttime="chat"] .parttime-unread-count { position: absolute; top: 2px; right: 2px; }
}
.parttime-task-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 68px; padding: 9px; border-radius: 12px; color: var(--ink); text-align: left; }
.parttime-task-item:hover { border-color: #ead2a6; }
.parttime-task-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #e8f2f4; color: #415f66; }
.parttime-task-card-copy { display: grid; gap: 2px; min-width: 0; }
.parttime-task-card-copy strong, .parttime-task-card-copy small { overflow-wrap: anywhere; }
.parttime-task-card-copy small, .parttime-task-meta small, .parttime-task-empty small { color: var(--muted); }
.parttime-task-empty { padding: 25px 12px; border-radius: 13px; text-align: center; }
.parttime-task-panel { display: grid; justify-items: start; gap: 9px; min-width: 0; padding: clamp(12px, 4vw, 20px); border-radius: 14px; }
.parttime-task-panel h2 { color: var(--ink); }
.parttime-task-panel form { display: grid; gap: 8px; width: 100%; }
.parttime-task-panel form textarea { font-size: 16px; }
.parttime-task-panel form .form-error { margin: 0; }
.parttime-task-panel form .btn { justify-self: start; min-height: 42px; }
.parttime-task-link-update { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fffbf3; }
.parttime-task-link-update summary { color: var(--accent-deep); font-weight: 650; cursor: pointer; }
.parttime-task-link-update p { margin-block: 6px; color: var(--muted); }
.parttime-task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.parttime-task-copy { display: grid; gap: 5px; width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fffbf3; }
.parttime-task-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.parttime-task-copy p { white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.parttime-task-materials { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 8px; width: 100%; }
.parttime-task-material { display: grid; gap: 5px; min-width: 0; margin: 0; }
.parttime-task-material :is(.parttime-image,.parttime-video) { width: 100%; margin: 0; }
.parttime-task-material figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.parttime-result-summary, .parttime-result-metrics { display: grid; width: 100%; gap: 5px; margin: 0; }
.parttime-result-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 11px; border-radius: 12px; }
.parttime-overview .parttime-result-summary { gap: 4px; padding: 12px; border-radius: 16px; }
.parttime-overview .parttime-result-summary div { padding-inline-start: 9px; }
.parttime-result-summary div { padding-inline-start: 6px; }
.parttime-result-summary div + div { border-inline-start: 1px solid var(--line); }
.parttime-result-summary dt, .parttime-result-metrics dt, .parttime-result-foot small { color: var(--muted); font-size: 12px; }
.parttime-result-summary dd, .parttime-result-metrics dd { margin: 0; color: var(--accent-deep); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.parttime-result-summary dd { font-size: 20px; }
.parttime-result-summary dd small { font-size: 11px; font-weight: 550; }
.parttime-result-card h2 { font-size: 16px; overflow-wrap: anywhere; }
.parttime-result-metrics { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.parttime-result-metrics div { padding: 4px 7px; border-radius: 7px; background: #edf5f6; }
.parttime-result-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; width: 100%; }
.parttime-publish-dialog { position: fixed; width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); }
.parttime-publish-dialog::backdrop { background: #211829c4; }
.parttime-publish-dialog ol { display: grid; gap: 7px; margin-block: 10px; padding-inline-start: 1.5em; }
.parttime-publish-dialog form { display: flex; justify-content: flex-end; }
.parttime-selected-number { color: var(--accent-deep); font-weight: 700; }
.parttime-portal .parttime-glass { border: 1px solid #fffd; background: linear-gradient(155deg, #fffefa, #fffbf1); box-shadow: 0 0 0 1px #82623a24, 0 14px 36px #694b2220; }
.parttime-portal .btn-primary { --primary-sheen: linear-gradient(115deg, #875b2b, #986d36 48%, #704823); }
.parttime-portal .btn-secondary:hover:not(:disabled) { background: #fff1d1; border-color: var(--line); }
.parttime-welcome { display: grid; justify-items: start; gap: 13px; width: min(100%, 500px); margin: 18px auto 44px; padding: clamp(22px, 5vw, 42px); border-radius: 22px; }
.parttime-welcome-icon { width: 54px; height: 54px; border-radius: 16px; }
.parttime-welcome-icon .icon { width: 27px; height: 27px; }
.parttime-welcome h1 { font: 700 clamp(25px, 6vw, 32px)/1.22 var(--heading-font); color: var(--ink); }
.parttime-welcome p { color: var(--muted-strong); }
.parttime-welcome form { display: grid; gap: 11px; width: 100%; }
.parttime-welcome .form-error { width: 100%; margin: 0; }
.parttime-main.is-binding { align-content: start; }
.parttime-binding { display: grid; gap: 20px; width: min(100%, 450px); margin: clamp(26px, 6vh, 65px) auto 32px; padding: clamp(19px, 6vw, 32px); border-radius: 24px; }
.parttime-binding-heading { display: flex; align-items: center; gap: 13px; }
.parttime-binding-heading .parttime-welcome-icon { width: 48px; height: 48px; border-radius: 15px; }
.parttime-binding-heading .icon { width: 24px; height: 24px; }
.parttime-binding-kicker { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.parttime-binding h1 { color: var(--ink); font-size: clamp(23px, 6vw, 28px); font-weight: 750; line-height: 1.25; }
.parttime-binding-hint { display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: start; gap: 9px; padding: 12px; border: 1px solid #d8e9ec; border-radius: 13px; background: #edf6f7; color: #3d5d63; }
.parttime-binding-hint .icon { width: 18px; height: 18px; margin-top: 2px; }
.parttime-binding-hint strong { font-size: 14px; }
.parttime-binding-hint p { margin-top: 2px; color: #4a6366; font-size: 12px; }
.parttime-binding form { display: grid; gap: 11px; min-width: 0; }
.parttime-binding .field { gap: 7px; }
.parttime-binding .field > span { font-size: 14px; }
.parttime-binding select { min-height: 48px; padding-inline: 12px; border-color: var(--line); border-radius: 12px; font-size: 16px; }
.parttime-binding .btn { min-height: 48px; border-radius: 12px; }
.parttime-binding .form-error { margin: 0; }
.parttime-binding-help, .parttime-binding-status { color: var(--muted); font-size: 12px; }
.parttime-binding-help { text-align: center; }
.parttime-login { min-height: 45px; width: 100%; color: #fff; background: #805626; border-color: #805626; }
.parttime-login:hover:not(:disabled) { color: #fff; background: #684721; border-color: #684721; }
.parttime-chat { display: grid; grid-template-rows: auto minmax(170px, 1fr) auto; min-width: 0; min-height: 420px; overflow: hidden; border-radius: 16px; }
.parttime-portal .parttime-chat { height: min(760px, calc(100vh - 144px)); height: min(760px, calc(100dvh - 144px)); }
.parttime-chat-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbf6ffeb; }
.parttime-chat-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.parttime-chat-person :is(h1,h2,p) { overflow-wrap: anywhere; }
.parttime-chat-person h1 { font-size: 17px; }
.parttime-chat-person p { color: var(--muted); font-size: 11px; }
.parttime-avatar { display: grid; place-items: center; flex: none; width: 35px; height: 35px; overflow: hidden; border: 1px solid #e5d6ee; border-radius: 11px; background: #f0e5f8; color: var(--accent-deep); font-weight: 700; }
.parttime-avatar img { grid-area: 1 / 1; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; }
.parttime-avatar > span { grid-area: 1 / 1; }
#parttime-account .parttime-avatar { width: 29px; height: 29px; font-size: 12px; }
.parttime-portal .parttime-avatar { border-color: #e5dac6; background: #eef5f6; color: #416069; }
.parttime-account-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.parttime-chat-scroll { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 12px 14px; scrollbar-color: #c6b2d7 #f7f0fa; }
.parttime-chat-scroll > .btn { display: flex; margin: 0 auto 11px; }
.parttime-messages { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.parttime-message { min-width: 0; }
.parttime-message:focus { outline: 2px solid #168660; outline-offset: 4px; border-radius: 6px; }
.parttime-message-time { display: block; margin: 8px 0 15px; color: #666; font-size: 12px; text-align: center; }
.parttime-message-row { display: flex; align-items: flex-start; gap: 11px; }
.parttime-message.is-mine .parttime-message-row { flex-direction: row-reverse; }
.parttime-message-row > .parttime-avatar { width: 38px; height: 38px; border: 0; border-radius: 5px; background: #dbe5e0; color: #2f5e4b; }
.parttime-message-content { display: grid; justify-items: start; min-width: 0; max-width: min(76%, 660px); gap: 3px; }
.parttime-message.is-mine .parttime-message-content { justify-items: end; }
.parttime-message-author { color: #595959; font-size: 11px; }
.parttime-message-delegate { color: #606760; font-size: 11px; overflow-wrap: anywhere; }
.parttime-message-payload { display: grid; justify-items: start; gap: 3px; max-width: 100%; min-width: 0; }
.parttime-message-recalled { padding: 8px 2px; color: #595959; font-size: 12px; }
.parttime-message.is-mine .parttime-message-payload { justify-items: end; }
.parttime-message-payload .parttime-bubble { position: relative; max-width: 100%; padding: 8px 11px; border-radius: 6px; background: var(--parttime-received); color: #161616; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.parttime-bubble::before { position: absolute; inset: 13px auto auto -3px; width: 7px; height: 7px; border-radius: 1px; background: inherit; content: ''; transform: rotate(45deg); }
.parttime-message.is-mine .parttime-bubble { background: #95ec69; }
.parttime-message.is-mine .parttime-bubble::before { inset-inline: auto -3px; }
.parttime-message-content .parttime-image, .parttime-message-content .parttime-video { margin-top: 0; border-color: #0001; border-radius: 6px; }
.parttime-message-content .parttime-image { background: #e4e4e4; }
.parttime-image-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: min(320px, 57vw); max-width: 100%; }
.parttime-image-group .parttime-image { width: 100%; aspect-ratio: 1; }
.parttime-image-group .parttime-image img { object-fit: cover; }
.parttime-message .parttime-message-reply { align-self: center; flex: 0 0 auto; min-width: 24px; padding-inline: 1px; color: #656565; font-size: 16px; }
@media (hover: hover) {
  .parttime-message-reply { opacity: 0; }
  .parttime-message:hover .parttime-message-reply, .parttime-message:focus-within .parttime-message-reply { opacity: 1; }
}
.parttime-reply-action {
  min-height: 24px;
  padding: 2px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.parttime-reply-action:hover, .parttime-reply-action:focus-visible { background: #ddd; }
.parttime-chat-scroll:not(.can-reply) [data-parttime-reply] { display: none; }
.parttime-message-quote, .parttime-reply-draft {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: #e6e6e6;
  color: #515151;
  font-size: 12px;
}
.parttime-message-quote { margin-top: 3px; text-align: left; cursor: pointer; }
.parttime-message-quote:hover, .parttime-message-quote:focus-visible { background: #ddd; }
.parttime-message-quote strong, .parttime-reply-content strong { overflow: hidden; max-width: 45%; text-overflow: ellipsis; white-space: nowrap; }
.parttime-reply-draft { align-items: center; justify-content: space-between; margin-bottom: 6px; }
.parttime-reply-content { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.parttime-reply-snippet { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.parttime-image, .parttime-video { display: block; max-width: 100%; margin-top: 3px; border: 1px solid #e7dcef; border-radius: 10px; background: #f2eaf8; }
.parttime-image { width: min(220px, 55vw); aspect-ratio: 4 / 3; padding: 0; overflow: hidden; cursor: zoom-in; }
.parttime-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.parttime-video { width: min(330px, 65vw); aspect-ratio: 16 / 9; background: #262032; }
.parttime-video-open { display: inline-block; margin-top: 3px; font-size: 11px; }
.parttime-image-dialog { position: fixed; inset: 0; width: min(1100px, calc(100vw - 22px)); height: calc(100vh - 22px); height: calc(100dvh - 22px); max-height: none; margin: auto; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--paper); color: var(--ink); }
.parttime-image-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.parttime-image-dialog::backdrop { background: #211829c4; }
.parttime-image-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.parttime-image-toolbar .btn { min-height: 36px; padding: 4px 10px; }
.parttime-image-toolbar .btn:last-child { margin-inline-start: auto; }
.parttime-image-viewport { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: var(--canvas); }
.parttime-image-viewport img { display: block; height: auto; max-width: none; margin-inline: auto; }
.parttime-image-viewport p { padding: 12px; }
.parttime-chat-empty { margin: 18px 0; color: var(--muted); text-align: center; }
.parttime-chat-foot { display: grid; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line); background: #fffdfdf2; }
.parttime-chat-foot p { font-size: 12px; color: var(--muted-strong); }
.parttime-chat-foot p.form-error { color: #963632; margin: 0; }
.parttime-compose-row { display: flex; align-items: end; gap: 7px; min-width: 0; }
.parttime-compose-row textarea { flex: 1; min-width: 0; max-height: 105px; min-height: 42px; font-size: 16px; }
.parttime-compose-row .btn { flex: none; min-height: 42px; white-space: nowrap; }
.parttime-attachment-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; }
.parttime-attachment-button { position: relative; min-height: 35px; padding: 4px 8px; color: var(--accent-deep); font-size: 12px; cursor: pointer; }
.parttime-attachment-button:focus-within { outline: 2px solid #8762a3; outline-offset: 2px; }
.parttime-attachment-button:has(input:disabled) { cursor: wait; opacity: .65; }
.parttime-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }
.parttime-attachment-draft { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; overflow-x: auto; }
.parttime-attachment-item { display: flex; align-items: center; flex: none; gap: 4px; max-width: 220px; min-width: 0; padding-inline-start: 7px; border-radius: 7px; background: #e6e6e6; }
.parttime-attachment-item img { flex: none; width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }
.parttime-attachment-name { min-width: 0; overflow: hidden; color: var(--muted-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.parttime-work-number { margin-top: 3px; color: var(--muted); font-size: 11px; }
.parttime-login-link { display: inline-flex; margin-top: 13px; }
.parttime-conversation { --parttime-received: #ececee; color: #161616; border-radius: 0; background: #f7f7f7; }
.parttime-conversation .parttime-chat-scroll { padding: 18px clamp(12px, 2vw, 24px); scrollbar-color: #b8b8b8 transparent; }
.parttime-staff { display: grid; grid-template-columns: clamp(210px, 28%, 310px) minmax(0, 1fr); height: max(460px, calc(100vh - 182px)); height: max(460px, calc(100dvh - 182px)); overflow: hidden; border: 1px solid #dcdce0; border-radius: 11px; background: #f7f7f7; color: #181818; }
.parttime-staff-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-end: 1px solid #dcdce0; background: #efeff1; }
.parttime-list-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 7px; padding: 10px 9px 6px 12px; }
.parttime-list-head .parttime-work-number { grid-column: 1 / -1; margin: 1px 2px 0; color: #616164; }
.parttime-list-search { position: relative; display: flex; align-items: center; min-width: 0; }
.parttime-list-search .icon { position: absolute; z-index: 1; inset-inline-start: 8px; width: 16px; height: 16px; color: #67676a; pointer-events: none; }
.parttime-staff .parttime-list-search input { width: 100%; height: 34px; padding: 0 7px 0 29px; border: 1px solid transparent; border-radius: 6px; background: #fafafa; color: #181818; font-size: 14px; }
.parttime-icon-button { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: #252525; cursor: pointer; list-style: none; }
.parttime-icon-button:hover { background: #00000009; }
.parttime-icon-button::-webkit-details-marker { display: none; }
.parttime-icon-button .icon { width: 21px; height: 21px; }
#parttime-staff-list { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#parttime-staff-list > :is(.muted, .form-error) { margin: 12px; }
.parttime-list-items { display: grid; }
.parttime-list-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 8px 12px; border: 0; background: transparent; color: inherit; text-align: left; }
.parttime-list-item::after { position: absolute; inset: auto 12px 0 62px; height: 1px; background: #00000009; content: ''; }
.parttime-list-item:hover { background: #e3e3e6; }
.parttime-list-item[aria-current="true"] { background: #128257; color: white; }
.parttime-list-item:focus-visible { z-index: 1; outline-offset: -2px; }
.parttime-list-avatar { position: relative; }
.parttime-list-avatar .parttime-avatar { width: 40px; height: 40px; border: 0; border-radius: 6px; background: #dbe5e0; color: #2f5e4b; }
.parttime-list-avatar .parttime-chat-unread { position: absolute; inset: -5px -6px auto auto; }
.parttime-list-copy, .parttime-list-meta { display: grid; gap: 2px; min-width: 0; }
.parttime-list-copy strong { font-size: 14px; font-weight: 600; }
.parttime-list-copy :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parttime-list-copy small, .parttime-list-meta { color: #59595d; font-size: 12px; }
.parttime-list-item[aria-current="true"] :is(small, .parttime-list-meta) { color: #fff; }
.parttime-list-meta { justify-items: end; align-self: start; padding-top: 1px; white-space: nowrap; }
.parttime-list-pin .icon { width: 13px; height: 13px; }
.parttime-pinned-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 5px 12px; border: 0; border-block: 1px solid #00000008; background: #e4e4e7; color: #48484a; font-size: 12px; text-align: left; }
.parttime-pinned-toggle .icon { width: 15px; height: 15px; }
.parttime-pinned-toggle .icon:last-child { margin-inline-start: auto; }
.parttime-pinned-toggle[aria-expanded="true"] .icon:last-child { transform: rotate(90deg); }
.parttime-pinned-chats { background: #e8e8eb; }
.parttime-list-more { padding: 10px 12px; }
.parttime-staff-pane { min-width: 0; min-height: 0; }
.parttime-staff .parttime-chat { grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.parttime-conversation-empty { display: grid; height: 100%; place-content: center; justify-items: center; color: #606060; }
.parttime-conversation-empty > .icon { width: 46px; height: 46px; color: #9d9d9d; }
.parttime-conversation-empty p { margin-top: 10px; }
.parttime-staff .parttime-chat-head { position: relative; z-index: 1; min-height: 56px; flex-wrap: nowrap; border-color: #e5e5e5; background: #f7f7f7; padding: 6px 16px; }
.parttime-staff .parttime-chat-person { flex: 1; }
.parttime-staff .parttime-chat-person > div { min-width: 0; }
.parttime-staff .parttime-chat-person h2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.parttime-staff .parttime-chat-person h2 { font-size: 17px; font-weight: 600; }
.parttime-staff-head-actions { flex: 0 0 auto; }
.parttime-header-task { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 4px 8px; border: 0; border-radius: 6px; background: #e9f3ed; color: #176445; font-size: 12px; }
.parttime-header-task .icon { width: 15px; height: 15px; }
.parttime-chat-menu { position: relative; }
.parttime-chat-menu-items { position: absolute; inset: calc(100% + 4px) 0 auto auto; z-index: 1; display: grid; width: max-content; min-width: 144px; padding: 4px; border: 1px solid #dedede; border-radius: 8px; background: #fff; box-shadow: 0 4px 16px #0002; }
.parttime-staff .parttime-chat-menu-items .btn { justify-content: flex-start; min-height: 36px; border: 0; border-radius: 5px; background: transparent; color: #232323; font-size: 13px; font-weight: 500; }
.parttime-staff .parttime-chat-menu-items .btn:hover { background: #efefef; }
.parttime-chat-menu-items small { max-width: 220px; padding: 6px 8px; border-top: 1px solid #eee; color: #626262; overflow-wrap: anywhere; }
.parttime-staff .parttime-menu-task, .parttime-staff .parttime-list-back { display: none; }
.parttime-staff .parttime-staff-task-panel { border-color: #ddd; background: #f0f3f1; }
.parttime-staff .parttime-chat-foot { padding: 9px 13px; border-color: #dedede; background: #fafafa; }
.parttime-staff .parttime-staff-delegate { color: #42644f; font-size: 12px; overflow-wrap: anywhere; }
.parttime-staff .parttime-compose-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.parttime-staff .parttime-compose-row textarea { grid-column: 1 / -1; width: 100%; min-height: 66px; resize: none; padding: 8px; border: 0; border-radius: 6px; background: white; color: #181818; }
.parttime-staff .parttime-compose-row .parttime-attachment-picker { min-width: 0; margin: 0; }
.parttime-staff .parttime-attachment-button { width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #292929; font-size: 25px; font-weight: 400; }
.parttime-staff .parttime-send-button { grid-column: 2; justify-self: end; min-height: 36px; padding: 0 17px; border: 0; border-radius: 6px; background: #087f53; color: white; box-shadow: none; }
.parttime-staff .parttime-send-button:hover:not(:disabled) { background: #076e48; }
@media (max-width: 730px) {
  .parttime-staff { grid-template-columns: minmax(0, 1fr); }
  .parttime-staff.is-open .parttime-staff-list, .parttime-staff:not(.is-open) .parttime-staff-pane { display: none; }
  .parttime-staff-list { border: 0; }
  .parttime-staff .parttime-list-search input { font-size: 16px; }
  .workspace:has(.parttime-staff.is-open) .topbar,
  .workspace:has(.parttime-staff.is-open) .page-heading { display: none; }
  .app-shell:has(.parttime-staff.is-open) :is(.sidebar, .nav-scrim) { display: none; }
  body:has(.parttime-staff.is-open) { overflow: hidden; }
  .parttime-staff.is-open { position: fixed; z-index: 4; inset: var(--parttime-chat-top, 0px) 0 auto; width: 100%; height: 100vh; height: var(--parttime-chat-height, 100dvh); border: 0; border-radius: 0; }
  .parttime-staff .parttime-conversation { --parttime-received: #fff; background: #ededed; }
  .parttime-staff .parttime-chat-head { display: grid; grid-template-columns: minmax(44px, 1fr) minmax(0, auto) minmax(max-content, 1fr); padding: 6px 8px; background: #ededed; }
  .parttime-staff .parttime-chat-person { justify-content: center; min-width: 0; text-align: center; }
  .parttime-staff .parttime-staff-head-actions { justify-content: end; }
  .parttime-header-task.parttime-balance-trigger { max-width: 32vw; }
  .parttime-staff .parttime-list-back { display: inline-flex; align-items: center; justify-self: start; gap: 1px; }
  .parttime-list-back .icon { transform: rotate(180deg); }
  .parttime-staff .parttime-back-unread { background: #d6d6d6; color: #242424; }
  .parttime-staff :is(#parttime-send-task, #parttime-show-task-notices) { display: none; }
  .parttime-staff .parttime-menu-task { display: inline-flex; }
  .parttime-staff .parttime-chat-foot { padding: 7px 8px max(8px, env(safe-area-inset-bottom)); }
  .parttime-staff .parttime-compose-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; }
  .parttime-staff .parttime-compose-row textarea { grid-column: 1; min-height: 40px; height: 40px; padding-block: 7px; }
  .parttime-staff .parttime-send-button { grid-column: 3; grid-row: 1; padding-inline: 10px; }
  .parttime-staff .parttime-compose-row:has(.parttime-attachment-draft:not([hidden])) .parttime-attachment-picker { grid-column: 1 / -1; grid-row: 2; }
  .parttime-message-content { max-width: min(72%, 540px); }
  .parttime-message-payload .parttime-bubble { font-size: 16px; }
}
@media (max-width: 460px) {
  .parttime-shell { padding-inline: 9px; }
  .parttime-top { min-height: 57px; }
  #parttime-account { gap: 4px; }
  .parttime-account-name { max-width: 8ch; }
  #parttime-account .btn { min-height: 42px; white-space: nowrap; }
  .parttime-portal .parttime-chat { height: calc(100vh - 130px); height: calc(100dvh - 130px); }
  .parttime-chat-head, .parttime-chat-scroll { padding-inline: 10px; }
  .parttime-portal .parttime-attachment-button { min-height: 46px; }
  .parttime-welcome { margin-bottom: 24px; }
  .parttime-welcome select { font-size: 16px; }
}

/* Contractor chat */
@media (max-width: 730px), (hover: none) and (pointer: coarse) {
  .parttime-portal-chat .parttime-message-reply,
  .parttime-portal-chat .parttime-message-quote { display: none; }
  .parttime-portal-chat .parttime-message:focus { outline: none; }
}
.parttime-portal.is-chat { overflow: hidden; }
.parttime-portal.is-chat .parttime-shell {
  position: fixed;
  inset: var(--parttime-chat-top, 0px) 0 auto;
  height: 100vh;
  height: var(--parttime-chat-height, 100dvh);
  min-height: 0;
  padding-bottom: 0;
}
.parttime-portal.is-chat :is(.parttime-top, .parttime-nav) { flex: none; }
.parttime-portal.is-chat .parttime-main { align-content: stretch; min-height: 0; }
.parttime-portal .parttime-portal-chat {
  --parttime-received: #fff;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background: #faf4e8;
  color: var(--ink);
}
.parttime-portal-chat .parttime-message.is-mine .parttime-bubble { background: #dceef1; color: #293e43; }
.parttime-portal-chat .parttime-message-author { color: var(--muted); font-size: 12px; line-height: 1.25; }
.parttime-notification-dialog > p { margin-block: 9px; }
.parttime-notification-actions { display: flex; justify-content: flex-end; gap: 8px; }
.parttime-follow-button { white-space: nowrap; }
.parttime-follow-card { display: grid; justify-items: center; gap: 10px; margin: 12px 0; padding: 13px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff7e5; text-align: center; }
.parttime-follow-card img { display: block; width: min(100%, 220px); height: auto; aspect-ratio: 1; background: #fff; }
.parttime-follow-card p { max-width: 35ch; color: var(--muted-strong); font-size: 13px; }
.parttime-portal .parttime-portal-chat-foot { padding: 9px 10px max(14px, env(safe-area-inset-bottom)); border-color: var(--line); background: #fff9ed; }
@media (max-width: 560px) {
  .parttime-portal .parttime-portal-chat-foot { padding-bottom: max(34px, env(safe-area-inset-bottom)); }
  .parttime-portal .parttime-portal-chat-foot:focus-within { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
.parttime-portal-compose .parttime-compose-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; }
.parttime-portal-compose textarea {
  grid-area: 2 / 1;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 11px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: #191919;
}
.parttime-portal-compose textarea:focus { outline: 1px solid var(--accent); outline-offset: 0; border-color: var(--accent); box-shadow: none; }
.parttime-portal-compose .parttime-attachment-picker { display: contents; }
.parttime-portal-compose .parttime-attachment-draft { grid-area: 1 / 1 / auto / -1; margin-bottom: 4px; }
.parttime-portal-compose .parttime-attachment-button {
  grid-area: 2 / 2;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent-deep);
  box-shadow: none;
}
.parttime-portal-compose .parttime-attachment-button:focus-within { outline-color: var(--accent); }
.parttime-portal-compose .parttime-attachment-button span { display: grid; place-items: center; font-size: 24px; font-weight: 400; line-height: 1; }
.parttime-portal-compose button[type="submit"] { grid-area: 2 / 3; min-width: 58px; min-height: 42px; padding: 6px 12px; border: 0; border-radius: 21px; background: #805626; color: #fff; box-shadow: none; }
.parttime-portal-compose button[type="submit"]:hover { background: #684721; }
.parttime-portal-compose button[type="submit"] .icon { display: none; }
