.parttime-portal {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 90% 12%, #fdecd9b5, transparent 40%),
    radial-gradient(ellipse at 6% 20%, #dfeffbea, transparent 52%),
    radial-gradient(ellipse at 80% 82%, #e3d8f5bc, transparent 60%), #f8f4fb;
}
.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-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: #3f2f55; font-size: 15px; }
.parttime-mark, .parttime-welcome-icon { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border: 1px solid #e1d0ec; border-radius: 11px; background: linear-gradient(155deg, #fff, #ecddf8); color: #674887; }
.parttime-mark .icon { width: 23px; height: 23px; }
.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(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid #fffd; border-radius: 13px; background: #fcf8ffda; box-shadow: 0 0 0 1px #7756921a; }
.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: #ded0ec; background: #eee3f8; color: var(--accent-deep); }
.parttime-nav .icon { width: 17px; height: 17px; }
.parttime-notice { margin-bottom: 9px; padding: 7px 11px; border: 1px solid #e1d3ec; border-radius: 9px; background: #f6eefbf5; color: var(--accent-deep); 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: #3e2c55; 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-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: #d3bde6; }
.parttime-task-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #eee3f8; color: var(--accent-deep); }
.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: #3e2c55; }
.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: #fbf8ff; }
.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 #e7dcef; border-radius: 9px; background: #fbf8ff; }
.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-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 { 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: #f3eaf9; }
.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 #e2d3ec; 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-glass { border: 1px solid #fffd; background: linear-gradient(155deg, #fffc, #fbf6fefa); box-shadow: 0 0 0 1px #7756921a, 0 14px 42px #49336317; }
.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: #3e2c55; }
.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-login { min-height: 45px; width: 100%; color: #fff; background: #19754d; border-color: #19754d; }
.parttime-login:hover:not(:disabled) { color: #fff; background: #145f3f; border-color: #145f3f; }
.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%; object-fit: cover; }
.parttime-avatar > span { grid-area: 1 / 1; }
#parttime-account .parttime-avatar { width: 29px; height: 29px; font-size: 12px; }
.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; justify-items: start; gap: 10px; margin: 0; padding: 0; list-style: none; }
.parttime-message { max-width: min(84%, 35rem); min-width: 0; }
.parttime-message.is-mine { justify-self: end; }
.parttime-message-meta { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 11px; }
.parttime-message.is-mine .parttime-message-meta { justify-content: end; }
.parttime-message p { margin-top: 2px; padding: 7px 10px; border: 1px solid #e7dcef; border-radius: 4px 12px 12px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.parttime-message.is-mine p { border-radius: 12px 4px 12px 12px; background: #efe5f8; }
.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; width: max-content; max-width: calc(100vw - 22px); max-height: calc(100vh - 22px); margin: auto; padding: 8px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); }
.parttime-image-dialog::backdrop { background: #211829c4; }
.parttime-image-dialog button { display: flex; margin: 0 0 6px auto; }
.parttime-image-dialog img { display: block; max-width: min(94vw, 1100px); max-height: calc(100vh - 85px); object-fit: contain; }
.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: 4px; min-width: 0; max-width: 100%; padding-inline-start: 7px; border-radius: 7px; background: #f2eaf8; }
.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-staff { display: grid; grid-template-columns: minmax(205px, 28%) minmax(0, 1fr); gap: 12px; }
.parttime-staff-list { min-width: 0; min-height: 260px; max-height: min(650px, 73vh); overflow-y: auto; padding: 11px; }
.parttime-list-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 8px; }
.parttime-list-head h2 { font-size: 15px; }
.parttime-list-items { display: grid; gap: 5px; }
.parttime-list-item { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px; border: 1px solid var(--soft-line); border-radius: 9px; background: #fffafdf2; color: var(--ink); text-align: left; }
.parttime-list-item[aria-current="true"] { border-color: #cfbae6; background: #f0e5fa; }
.parttime-list-item > div { display: grid; gap: 2px; min-width: 0; }
.parttime-list-item :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parttime-list-item small { color: var(--muted); }
.parttime-list-more { margin-top: 8px; }
.parttime-staff .parttime-chat { min-height: 430px; height: min(650px, max(430px, 71vh)); }
.parttime-staff .parttime-chat .btn { min-height: 36px; }
.parttime-list-back { display: none; }
@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-list-back { display: inline-flex; }
}
@media (max-width: 460px) {
  .parttime-shell { padding-inline: 9px; }
  .parttime-top { min-height: 57px; }
  .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; }
}
