/* Review batch: pending recordings, compact recording drawer, and media affordances. */
:root {
  --workbench-date-heading-size: 13px;
  --workbench-date-heading-color: var(--neutral-text-secondary);
  --workbench-date-heading-height: 34px;
  --workbench-date-heading-line-height: 19.5px;
  --workbench-first-date-heading-margin: 4px;
  --pending-record-title-size: 16px;
  --pending-record-meta-size: 11px;
  --pending-record-group-size: 15px;
  --pending-record-card-radius: 14px;
  --pending-record-card-gap: 10px;
  --recording-action-orange: #e25606;
}

body .phone #organize-speaker .transcript-speaker {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

body .phone #organize-speaker .transcript-speaker-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke-width: 1.8;
  transition: transform .16s ease;
}

body .phone #organize-speaker .transcript-speaker[aria-expanded="true"] .transcript-speaker-chevron {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  body .phone #organize-speaker .transcript-speaker-chevron {transition: none}
}

body .phone #workbench #workbench-visits > .visit-date-heading,
body .phone #workbench #workbench-todo > .todo-date {
  height: var(--workbench-date-heading-height);
  min-height: var(--workbench-date-heading-height);
  color: var(--workbench-date-heading-color) !important;
  font-size: var(--workbench-date-heading-size);
  line-height: var(--workbench-date-heading-line-height);
}

body .phone #workbench #workbench-todo > .todo-date:nth-child(1 of .todo-date:not([hidden])) {
  margin-top: var(--workbench-first-date-heading-margin);
}

body .phone #pending-recordings-page > .pending-records-list {
  display: grid;
  gap: 20px;
  padding: 0 0 28px;
  background: var(--neutral-surface-raised);
}

body .phone #pending-recordings-page .pending-date-group {
  display: grid;
  gap: 10px;
}

body .phone #pending-recordings-page .pending-date-heading {
  margin: 0;
  color: var(--neutral-text-primary);
  font-size: var(--pending-record-group-size);
  font-weight: 600;
  line-height: 22px;
}

body .phone #pending-recordings-page .pending-day-list {
  display: grid;
  gap: var(--pending-record-card-gap);
}

body .phone #pending-recordings-page .pending-review-swipe {
  position: relative;
  overflow: hidden;
  border-radius: var(--pending-record-card-radius);
  background: var(--neutral-surface-subtle);
}

body .phone #pending-recordings-page .pending-review-swipe > .pending-review-card {
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  transition: transform .2s ease;
}

body .phone #pending-recordings-page .pending-review-swipe.open > .pending-review-card {
  transform: translateX(-72px);
}

body .phone #pending-recordings-page .pending-review-swipe.dragging > .pending-review-card {
  transition: none;
}

body .phone #pending-recordings-page .pending-review-delete {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 18px;
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-danger-text);
  color: var(--color-on-brand);
  transform: translateY(-50%);
  pointer-events: none;
}

body .phone #pending-recordings-page .pending-review-swipe.open > .pending-review-delete {
  pointer-events: auto;
}

body .phone #pending-recordings-page .pending-review-delete .fluent-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

body .phone #pending-recordings-page .pending-review-card {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 9px;
  box-sizing: border-box;
  padding: 15px 14px;
  border: 1px solid var(--neutral-stroke-control);
  border-radius: var(--pending-record-card-radius);
  background: var(--neutral-surface-raised);
  box-shadow: none;
  color: var(--neutral-text-primary);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  body .phone #pending-recordings-page .pending-review-swipe > .pending-review-card {transition: none}
}

body .phone #pending-recordings-page .pending-review-title-row,
body .phone #pending-recordings-page .pending-review-title,
body .phone #pending-recordings-page .pending-review-meta,
body .phone #pending-recordings-page .pending-review-opportunity,
body .phone #pending-recordings-page .pending-review-fact {
  display: flex;
  align-items: center;
}

body .phone #pending-recordings-page .pending-review-title-row {
  min-width: 0;
  gap: 8px;
}

body .phone #pending-recordings-page .pending-review-title {
  min-width: 0;
  flex: 1;
  gap: 0;
  font-size: var(--pending-record-title-size);
  font-weight: 600;
  line-height: 24px;
}

body .phone #pending-recordings-page .pending-review-name {
  min-width: 0;
  order: 2;
}

body .phone #pending-recordings-page .pending-review-title .record-new-mark {
  order: 1;
  margin-right: 7px;
  margin-left: 0;
}

body .phone #pending-recordings-page .pending-live-mark {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-inline: 4px;
  border-radius: 50%;
  background: var(--color-brand-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-brand-primary) 16%, transparent);
  animation: pending-live-breathe 1.8s ease-in-out infinite;
}

body .phone #pending-recordings-page .pending-review-source {
  order: 3;
  margin-left: 8px;
  height: var(--tag-status-height);
  padding: var(--tag-status-padding);
  border-radius: var(--tag-radius-pill);
  background: var(--tag-neutral-surface);
  color: var(--tag-neutral-text);
  font-size: var(--tag-status-font-size);
  font-weight: var(--tag-font-weight);
  line-height: var(--tag-status-height);
  white-space: nowrap;
}

body .phone #pending-recordings-page .pending-review-action {
  display: inline-flex;
  height: 28px;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 0 9px;
  border-radius: var(--tag-radius-pill);
  background: var(--color-brand-subtle);
  color: var(--color-brand-primary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

body .phone #pending-recordings-page .pending-review-meta {
  min-width: 0;
  gap: 10px;
  color: var(--neutral-text-tertiary);
  font-size: var(--pending-record-meta-size);
  line-height: 18px;
  white-space: nowrap;
}

body .phone #pending-recordings-page .pending-review-fact {
  min-width: 0;
  gap: 4px;
}

body .phone #pending-recordings-page .pending-review-location {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

body .phone #pending-recordings-page .pending-review-meta .fluent-icon,
body .phone #pending-recordings-page .pending-review-opportunity .fluent-icon,
body .phone #pending-recordings-page .pending-review-action .fluent-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: currentColor;
}

body .phone #pending-recordings-page .pending-review-opportunity {
  min-width: 0;
  gap: 6px;
  color: var(--neutral-text-secondary);
  font-size: 12px;
  line-height: 18px;
}

body .phone #pending-recordings-page .pending-review-opportunity > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .phone > #recording.recording-drawer-visible {
  inset: 70px 0 0;
  display: flex !important;
  flex-direction: column;
  height: auto;
  min-height: 0;
  max-height: none;
}

body .phone > #recording.recording-drawer-visible > :is(.recording-drawer-handle, .app-head, .recording-meta) {
  flex: 0 0 auto;
}

body .phone > #recording.recording-drawer-visible > .recording-shell {
  flex: 1 1 auto;
  min-height: 0;
}

body .phone > #recording.recording-drawer-visible > .recording-shell > .recording-kicker {
  color: var(--recording-action-orange);
}

body .phone > #recording.recording-drawer-visible > .recording-shell > .wave {
  flex: 1 1 auto;
  height: auto;
  min-height: 220px;
  justify-content: space-between;
  gap: 0;
  margin-top: 26px;
  border: 0;
}

body .phone > #recording.recording-drawer-visible > .recording-shell > .wave::after {
  content: none;
}

body .phone > #recording.recording-drawer-visible > .recording-shell > .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
}

body .phone > #recording.recording-drawer-visible [data-end-recording] {
  color: var(--recording-action-orange) !important;
}

body .phone > #recording.recording-drawer-visible .recording-meta > .form-row > label {
  font-size: 13px;
  line-height: 22px;
}

body .phone > #recording.recording-drawer-visible > .app-head > .recording-finish {
  display: none !important;
}

body .phone > #recording.recording-drawer-visible > .app-head > .recording-finish:not(:disabled) {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary);
  color: var(--color-on-brand, #fff);
}

body .phone > #recording.recording-drawer-visible > .app-head > .recording-finish:not(:disabled):is(:hover, :focus-visible) {
  background: var(--color-brand-hover);
}

body .phone.recording-drawer-collapsed > #recording.recording-drawer-visible {
  height: 76px;
  min-height: 76px;
  max-height: 76px;
}

body .phone.recording-drawer-collapsed > #recording.recording-drawer-visible > .recording-mini {
  padding-right: 16px;
}

body .phone.recording-drawer-collapsed:not(.recording-drawer-paused) .recording-mini-wave,
body .phone.recording-drawer-collapsed:not(.recording-drawer-paused) .recording-mini-state {
  color: var(--recording-action-orange);
}

body .phone.recording-drawer-collapsed:not(.recording-drawer-paused) .recording-mini-pause {
  background: var(--color-warning-surface);
  color: var(--recording-action-orange) !important;
}

body .phone.recording-drawer-collapsed:not(.recording-drawer-paused) .recording-mini-pause::after {
  background: conic-gradient(var(--recording-action-orange) var(--recording-hold-angle), transparent 0);
}

body .phone #workbench-visits .ended-reminder > svg {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes pending-live-breathe {
  0%, 100% {
    transform: scale(.92);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-primary) 12%, transparent);
  }
  50% {
    transform: scale(1);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-brand-primary) 20%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  body .phone #pending-recordings-page .pending-live-mark { animation: none; }
}

/* Prompt template pages share the standard raised document surface. */
body .phone:has(:is(#prompt-templates, #prompt-template-edit).active),
body .phone:has(:is(#prompt-templates, #prompt-template-edit).active)::after,
body .phone .screen:has(:is(#prompt-templates, #prompt-template-edit).active),
body .phone :is(#prompt-templates, #prompt-template-edit),
body .phone :is(#prompt-templates, #prompt-template-edit) > .app-head {
  background: var(--neutral-surface-raised) !important;
}

body .phone #prompt-template-edit.active {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

body .phone #prompt-template-edit textarea.template-editor-content {
  height: clamp(500px, calc(100dvh - 320px), 560px) !important;
  min-height: 500px;
  overflow-y: auto;
  resize: none;
}

body .phone #prompt-template-edit > .primary:last-child {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  box-shadow: 0 0 0 10px var(--neutral-surface-raised), 0 -12px 20px var(--neutral-surface-raised);
}

/* Audio playback is a brand action: keep its compact control circular and blue in every state. */
body .phone .shared-audio-player button.audio-toggle {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: var(--neutral-surface-subtle);
  color: var(--color-brand-primary) !important;
}

@media (hover: hover) and (pointer: fine) {
  body .phone .shared-audio-player button.audio-toggle:hover:not(:disabled) {
    background: var(--color-brand-subtle);
    color: var(--color-brand-hover) !important;
  }
}

body .phone .shared-audio-player button.audio-toggle:is(:active, .is-playing):not(:disabled) {
  background: var(--color-brand-border);
  color: var(--color-brand-pressed) !important;
}

body .phone .shared-audio-player button.audio-toggle:focus-visible {
  outline-color: var(--color-focus-ring);
}

/* Shared audio rows stay transparent; surrounding forms own their grouping. */
body .phone .shared-audio-player {
  align-items: stretch;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

body .phone .shared-audio-player > .record-audio-main {
  width: 100%;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
}

body .phone :is(#organize-link, #organize-speaker, #organize-edit) .shared-audio-player {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* Form audio nodes stay flat even before the shared-player enhancer runs. */
body .phone :is(#organize-link, #organize-speaker, #organize-edit) > .record-audio-player {
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .phone .shared-audio-player {
  display: block;
  overflow-anchor: none;
}

body .phone .shared-audio-player:not(.is-expanded) .record-audio-timeline {
  display: none !important;
}

body .phone .shared-audio-player.is-expanded .record-audio-timeline {
  display: block;
  width: 100%;
  margin-top: 0;
  padding-bottom: 8px;
}

body .phone .shared-audio-player .record-audio-time {
  display: none;
}

/* Section-title disclosures share one plain text-and-chevron treatment. */
body .phone #ended-visit-detail .ended-transcript-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent !important;
  text-decoration: none;
}

body .phone #ended-visit-detail .ended-transcript-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform .16s ease;
}

body .phone #ended-visit-detail .ended-transcript-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

body .phone #ended-visit-detail .ended-transcript-disclosure {
  padding: 2px 2px 14px;
  color: var(--neutral-text-secondary);
  font-size: 14px;
  line-height: 22px;
}

body .phone #ended-visit-detail .ended-transcript-disclosure[hidden] {
  display: none !important;
}

body .phone #ended-visit-detail .ended-transcript-disclosure p {
  margin: 0;
  padding: 8px 0;
}

body .phone #ended-visit-detail .ended-transcript-disclosure b {
  color: var(--neutral-text-primary);
}

body .phone :is(#organize-link, #organize-speaker, #organize-edit) .shared-audio-player.attachment-audio-player,
body .phone .shared-audio-player.attachment-audio-player {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body .phone :is(.attachment-audio-remove, .attachment-remove) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-danger-text) !important;
  color: #fff !important;
}

body .phone :is(.attachment-audio-remove, .attachment-remove) .fluent-icon {
  width: 18px;
  height: 18px;
  color: #fff !important;
  stroke: currentColor !important;
}

@media (hover: hover) and (pointer: fine) {
  body .phone button.link:is(.attachment-audio-remove, .attachment-remove):hover:not(:disabled):not(:active) {
    background: var(--color-danger-text) !important;
    color: #fff !important;
  }
}

body .phone button.link:is(.attachment-audio-remove, .attachment-remove):active:not(:disabled) {
  background: var(--color-danger-pressed) !important;
  color: #fff !important;
}

/* Attachment items do not own separators; the surrounding form defines grouping. */
body .phone #organize-edit .attachment-list > .attachment-file-row {
  border-bottom: 0;
}

/* Let the page title scroll away and keep only the workflow tabs pinned. */
body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit) > .app-head {
  position: relative;
  top: auto;
  z-index: auto;
}

body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit) > .steps {
  top: 0 !important;
  z-index: 7;
}

/* Keep the step number and its label optically centered on the same row. */
body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit) > .steps > .step {
  min-height: 24px;
  align-items: center !important;
  line-height: 24px !important;
}

body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit) > .steps > .step > b {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1 !important;
}

/* The 8px group divider belongs to the page and reaches both screen edges. */
body .phone #organize-link > .record-detail-group-title.record-detail-group-break::before {
  right: -20px;
  left: -20px;
}

body .phone #organize-speaker > .section-title.record-detail-group-title.organize-transcript-heading {
  margin: 12px -18px 2px !important;
}

body .phone #organize-edit .summary-template-add {
  width: 100%;
  margin: 4px 0 0;
  border-radius: 0;
}

body .phone #organize-edit > .organize-note-content > [data-note-editor][data-empty="true"]:focus::before {
  content: none;
}

body .phone #organize-edit > .organize-note-content > [data-note-editor] :is(ul, ol) {
  margin: 0;
  padding-left: 24px;
}

body .phone #organize-edit > .organize-note-content > [data-note-editor] li {
  margin: 0 0 4px;
}

body .phone #organize-edit > .organize-note-content > [data-note-editor] a {
  color: var(--color-brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  cursor: pointer;
}

/* Transcript paragraphs are grouped by spacing, without per-paragraph rules. */
body .phone #organize-edit > .transcript-disclosure > .full-transcript p {
  border-top: 0;
}

body .phone #organize-edit > .transcript-disclosure > .organize-note-subsection-title {
  border-top: 0 !important;
}

@media (max-width: 430px) {
  body .phone #organize-link > .record-detail-group-title.record-detail-group-break::before {
    right: -18px;
    left: -18px;
  }
}

/* Four compact workflow steps remain readable on one horizontal row. */
body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit, #organize-action) > .steps {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: center;
  gap: 0 !important;
  padding-right: 8px !important;
  padding-left: 8px !important;
}

body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit, #organize-action) > .steps > .step {
  display: flex !important;
  min-width: 0;
  min-height: 24px;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-size: 12px !important;
  line-height: 20px !important;
  white-space: nowrap;
}

body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit, #organize-action) > .steps > .step::after {
  content: "›" !important;
  top: 50% !important;
  right: -3px !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  transform: translateY(-52%);
  background: transparent !important;
  color: #9bb7d8;
  font-size: 18px;
  line-height: 1;
}

body .phone :is(#organize-link, #organize-speaker, #organize-summary, #organize-edit, #organize-action) > .steps > .step > b {
  width: 22px !important;
  min-width: 22px;
  height: 22px !important;
  font-size: 10px !important;
}

body .phone #organize-edit .note-rich-heading-mark {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.2px;
}

body .phone #organize-edit [data-note-editor] > h1 {
  margin: 8px 0 6px;
  font-size: 20px;
  line-height: 28px;
}

body .phone #organize-edit [data-note-editor] > h2 {
  margin: 8px 0 4px;
  font-size: 17px;
  line-height: 24px;
}

/* The attachment list is the content surface; its wrapper must not add a second card. */
body .phone #organize-edit > .box:has(#attachment-input) {
  display: block !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--notes-divider) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .phone #organize-edit > .box:has(#attachment-input) > .attachment-list {
  margin: 0 !important;
}

/* Section separators follow the content they divide, not the next heading. */
body .phone #organize-edit > .organize-note-attachment-title {
  border-top: 0 !important;
}

body .phone #workbench-todo > .workbench-empty-state {
  display: grid;
  min-height: 300px;
  place-content: center;
  justify-items: center;
  color: var(--neutral-text-tertiary);
  font-size: 14px;
}

body .phone #workbench-todo > .workbench-empty-state[hidden] {
  display: none !important;
}

body .phone #visit-notes > .box:has(> .notes-empty-state) {
  min-height: 360px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body .phone #visit-notes .notes-empty-state {
  display: grid;
  min-height: 320px;
  margin: 0;
  place-items: center;
  color: var(--neutral-text-tertiary);
  font-size: 14px;
}

/* Attendee labels and their adjacent add actions share one form-control shape. */
body .phone {
  --attendee-control-radius: var(--form-control-radius, 8px);
  --attendee-control-height: 36px;
}

body .phone :is(.attendee-chip, .attendee-add-toggle) {
  height: var(--attendee-control-height) !important;
  min-height: var(--attendee-control-height) !important;
  box-sizing: border-box;
  border-radius: var(--attendee-control-radius) !important;
}

body .phone .attendee-chip {
  border: 1px solid var(--neutral-stroke-control, #d4d4d8) !important;
  background: var(--neutral-surface-primary, #fff) !important;
  color: var(--neutral-text-primary) !important;
}

/* Page headers share one full-width white surface across every screen view. */
body .phone .screen > .view > .app-head {
  isolation: isolate;
  background: #fff !important;
}

body .phone .screen > .view > .app-head::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: -100vmax;
  bottom: 0;
  left: -100vmax;
  background: #fff;
  content: "";
  pointer-events: none;
}

/* The first edit-todo field ends with its control; spacing belongs to the next field. */
body .phone #edit-todo > .box > .form-row:first-child {
  padding-bottom: 0 !important;
}

/* Standalone form actions use the shared primary button without a sticky-footer halo. */
body .phone #edit-todo > [data-save-edit-todo] {
  box-shadow: none !important;
}

/* Step 4 moves directly from AI extraction feedback into the shared todo-card surface. */
body .phone #organize-action .organize-action-loading {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

body .phone #organize-action .organize-action-loading[hidden],
body .phone #organize-action .organize-action-list[hidden] {
  display: none !important;
}

body .phone #organize-action .organize-action-loading-copy {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  color: var(--neutral-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

body .phone #organize-action .organize-action-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid var(--neutral-stroke-control);
  border-top-color: var(--color-brand-primary);
  border-radius: 50%;
  animation: organize-action-spin .8s linear infinite;
}

body .phone #organize-action .organize-action-skeleton {
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--wb-border, var(--neutral-stroke-control));
  border-radius: var(--wb-radius, 12px);
  background: var(--neutral-surface-raised);
}

body .phone #organize-action .organize-action-skeleton > span {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border-radius: 50%;
  background: var(--neutral-surface-subtle);
}

body .phone #organize-action .organize-action-skeleton > div {
  display: grid;
  flex: 1;
  gap: 9px;
  padding-top: 2px;
}

body .phone #organize-action .organize-action-skeleton i {
  width: 58%;
  height: 11px;
  border-radius: 6px;
  background: var(--neutral-surface-subtle);
}

body .phone #organize-action .organize-action-skeleton i + i {
  width: 84%;
  height: 9px;
}

body .phone #organize-action .organize-action-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

body .phone .todo-swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: var(--wb-radius, 12px);
  background: var(--neutral-surface-subtle, #f2f3f5);
}

body .phone .todo-swipe-content {
  position: relative;
  z-index: 1;
  -webkit-user-select: none;
  touch-action: pan-y;
  transition: transform .2s ease;
  user-select: none;
}

body .phone .todo-swipe-row.open .todo-swipe-content {
  transform: translateX(-112px);
}

body .phone .todo-swipe-actions {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  width: 112px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--neutral-surface-subtle, #f2f3f5);
  pointer-events: none;
}

body .phone .todo-swipe-row.open .todo-swipe-actions {
  pointer-events: auto;
}

body .phone .todo-swipe-action {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  opacity: 1 !important;
  transform: scale(var(--todo-swipe-scale, .72));
  transition: transform .2s ease;
}

body .phone .todo-swipe-row.dragging .todo-swipe-action {
  transition: none;
}

body .phone .todo-swipe-action .fluent-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

body .phone .todo-swipe-edit {
  background: #dce2e9;
  color: var(--neutral-text-primary);
}

body .phone .todo-swipe-delete {
  background: var(--color-danger-text);
  color: var(--color-on-brand);
}

body .phone .swipe-row .swipe-delete {
  top: calc(50% - 18px);
  right: 16px;
  bottom: auto;
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-danger-text) !important;
  color: #fff !important;
  font-size: 0;
}

body .phone .swipe-row .swipe-delete .fluent-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
}

body .phone #organize-action .todo-swipe-content {
  min-height: 76px;
  margin: 0;
  padding: 14px 32px 14px 14px;
  border: 1px solid var(--wb-border, var(--neutral-stroke-control));
  border-radius: var(--wb-radius, 12px) !important;
  background: var(--wb-card-bg, var(--neutral-surface-raised));
  box-shadow: var(--shadow4);
}

body .phone .saved-todo-swipe-row {
  margin-bottom: 8px;
  border-radius: var(--content-card-radius, 12px);
  box-shadow: 0 3px 14px #273b5410;
}

body .phone .saved-todo-swipe-row > .todo-swipe-content {
  min-height: 76px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--wb-border, var(--neutral-stroke-control));
  border-radius: var(--content-card-radius, 12px) !important;
  background: var(--neutral-surface-raised, #fff);
  box-shadow: none;
}

body .phone :is(#workbench, #visit-detail, #ended-visit-detail, #ended-visit-empty-detail) .saved-todo-swipe-row > .workbench-todo-card {
  min-height: 76px;
  padding: 14px;
  gap: 12px;
  border: 1px solid var(--wb-border, var(--neutral-stroke-control));
  border-radius: var(--content-card-radius, 12px) !important;
  background: var(--neutral-surface-raised, #fff);
  color: #444;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: none;
}

body .phone :is(#workbench, #visit-detail, #ended-visit-detail, #ended-visit-empty-detail) .workbench-todo-card .row-title {
  color: var(--wb-text, #202936);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

body .phone :is(#workbench, #visit-detail, #ended-visit-detail, #ended-visit-empty-detail) .workbench-todo-card .row-meta {
  color: var(--wb-secondary, #7b8492);
  font-size: 12px;
  line-height: 19px;
}

body .phone :is(#workbench, #visit-detail, #ended-visit-detail, #ended-visit-empty-detail) .workbench-todo-card .check {
  position: relative;
  z-index: 2;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  flex: 0 0 22px;
  padding: 0 !important;
  border: 1.5px solid #aebdce;
  border-radius: 50% !important;
  background: #fff;
}

body .phone .saved-todo-swipe-row > .todo-swipe-content.danger::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--color-danger-text);
  content: '';
}

body .phone #visit-detail > #visit-todo-list,
body .phone #ended-visit-detail > #ended-todo-list,
body .phone #ended-visit-empty-detail > #ended-empty-todo-content.box,
body .phone :is(#visit-detail, #ended-visit-detail, #ended-visit-empty-detail) [data-local-visit-tasks] {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body .phone :is(#visit-detail, #ended-visit-detail, #ended-visit-empty-detail) > .visit-todo-filter {
  margin-bottom: 16px;
}

body .phone :is(#visit-detail, #ended-visit-detail, #ended-visit-empty-detail) .saved-todo-swipe-row {
  margin-bottom: 12px;
  box-shadow: none;
}

body .phone :is(#visit-detail, #ended-visit-detail, #ended-visit-empty-detail) .saved-todo-swipe-row:last-child {
  margin-bottom: 0;
}

body .phone #workbench #workbench-visits > .visit-swipe-row {
  margin: 0 0 10px;
  cursor: pointer;
  box-shadow: 0 2px 9px rgba(40, 80, 120, 0.03);
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card {
  display: grid;
  min-height: 94px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 14px 32px 14px 13px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius) !important;
  outline: 0;
  background: var(--wb-card-bg);
  box-shadow: none;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card:focus-visible {
  box-shadow: inset 0 0 0 2px var(--wb-primary);
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .time {
  color: var(--wb-text);
  font-size: 17px;
  font-weight: 650;
  line-height: 21px;
  letter-spacing: -0.4px;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .row-title,
body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .visit-company-name {
  min-width: 0;
  color: var(--wb-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .visit-list-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .visit-company-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .row-meta {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--wb-secondary);
  font-size: 12px;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .visit-list-state {
  display: inline-flex;
  flex: 0 0 auto;
  height: var(--tag-status-height);
  min-height: var(--tag-status-height);
  align-items: center;
  padding: var(--tag-status-padding);
  border-radius: var(--tag-radius-pill);
  background: var(--tag-neutral-surface);
  color: var(--tag-neutral-text);
  font-size: var(--tag-status-font-size);
  font-weight: var(--tag-font-weight);
  line-height: var(--tag-status-height);
  white-space: nowrap;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .visit-list-state[data-status="进行中"] {
  background: var(--tag-success-surface) !important;
  color: var(--tag-success-text) !important;
}

body .phone #edit-visit input.field-input[data-edit-time] {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23616161' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 9h16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .arrow {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  width: 20px;
  height: 32px;
  place-items: center;
  color: var(--wb-secondary);
  transform: translateY(-50%);
}

body .phone #workbench #workbench-visits > .visit-swipe-row > .visit-swipe-card .arrow svg {
  width: 18px;
  height: 18px;
}

body .phone #organize-action .todo-swipe-content .check {
  width: 21px;
  height: 21px;
  min-width: 21px;
  border-color: #aebdce;
  border-radius: 50%;
  pointer-events: none;
}

body .phone #organize-action .todo-swipe-content .row-title {
  color: var(--wb-text, var(--neutral-text-primary));
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

body .phone #organize-action .todo-swipe-content .row-meta {
  color: var(--wb-secondary, var(--neutral-text-secondary));
  font-size: 12px;
  line-height: 19px;
}

body .phone .organize-action-delete-dialog .cache-dialog-actions > button {
  min-height: 44px;
  border: 1px solid var(--neutral-stroke-control);
  border-radius: 10px;
  background: var(--neutral-surface-raised);
  color: var(--neutral-text-primary);
  font-size: 14px;
  font-weight: 600;
}

body .phone .organize-action-delete-dialog .organize-action-delete-confirm,
body .phone .organize-action-delete-dialog .organize-action-delete-confirm:hover,
body .phone .organize-action-delete-dialog .organize-action-delete-confirm:active {
  border-color: var(--color-danger-text) !important;
  background: var(--color-danger-text) !important;
  color: #fff !important;
}

@keyframes organize-action-spin {to{transform:rotate(360deg)}}

@media (prefers-reduced-motion: reduce) {
  body .phone #organize-action .organize-action-spinner {animation: none}
  body .phone .todo-swipe-content {transition: none}
}

/* Keep the last line or empty state scrollable above persistent page actions. */
body .phone .screen::after,
body .phone #todo > .box::after {
  display: block;
  width: 100%;
  height: 40px;
  min-height: 40px;
  content: "";
  pointer-events: none;
}

/* The visit action owns the bottom safe area, so trailing page space must not lift it. */
body .phone .screen:has(#visit-detail.active)::after {
  display: none;
}

/* Celebrate only the successful recording-to-visit handoff without blocking the detail page. */
body .phone > .visit-celebration-layer {
  position: absolute;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

body .phone > .visit-celebration-layer > canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  body .phone > .visit-celebration-layer { display: none; }
}
