.task-detail {
  max-width: var(--mobile-page-width);
  color: #18233c;
  background: linear-gradient(155deg, #ffede5 0, #fff7f2 160px, #f4f7fa 360px);
  padding-bottom: calc(var(--bottom-nav-space) + 92px);
  --td-muted: #78869a;
  --td-line: #edf0f4;
}
.task-detail main {
  padding: 0 16px 20px;
}
.task-detail .page-head {
  padding: 12px 12px 14px;
  gap: 8px;
}
.task-detail .page-head h1 {
  font-size: 1.14rem;
  letter-spacing: 0;
}
.task-detail .page-head .icon-button {
  background: transparent;
}
.task-detail :is(h1, h2, h3, strong) {
  overflow-wrap: anywhere;
}
.task-detail .card,
.td-hero {
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid #fff;
  box-shadow: 0 5px 20px #263b5910;
  margin: 0 0 14px;
}
.td-hero {
  padding: 21px 20px 0;
  background: linear-gradient(135deg, #fff, #fffdfa);
}
.td-category {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cd6150;
  font-size: 0.8rem;
}
.td-category .icon {
  width: 17px;
  height: 17px;
}
.td-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.76rem;
  white-space: nowrap;
}
.td-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.td-red {
  color: #ed5d4e;
  background: #fff0ec;
}
.td-blue {
  color: #3985bf;
  background: #edf6ff;
}
.td-amber {
  color: #ad7618;
  background: #fff6df;
}
.td-green {
  color: #169d78;
  background: #e9f8f1;
}
.td-gray {
  color: #718095;
  background: #f1f4f7;
}
.td-hero h1 {
  font-size: 1.5rem;
  line-height: 1.5;
  letter-spacing: 0;
  margin: 14px 0 8px;
}
.td-org {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--td-muted);
  font-size: 0.8rem;
  margin-bottom: 20px;
}
.td-org .icon {
  width: 15px;
  height: 15px;
  margin: 0;
}
.td-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 17px 0;
  border-top: 1px solid var(--td-line);
}
.td-metrics > div {
  display: grid;
  grid-template-columns: 16px auto;
  align-items: center;
  justify-content: center;
  gap: 6px 5px;
}
.td-metrics > div + div {
  border-left: 1px solid var(--td-line);
}
.td-metrics .icon {
  width: 15px;
  height: 15px;
  color: #96a0b1;
}
.td-metrics span {
  color: var(--td-muted);
  font-size: 0.72rem;
}
.td-metrics strong {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.55rem;
  line-height: 1.2;
}
.td-metrics > div:first-child strong {
  color: #ee6956;
}
.td-metrics small {
  color: var(--td-muted);
  font-size: 0.72rem;
  font-weight: 400;
  margin-left: 4px;
}
.td-attention {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 2px 0 16px;
  border: 1px solid #ffe4d8;
  border-radius: 15px;
  background: #fff2e9;
  color: #a44f34;
  text-align: left;
}
.td-attention > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.td-attention strong {
  display: block;
  font-size: 0.88rem;
}
.td-attention small {
  display: block;
  color: #aa8070;
  font-size: 0.73rem;
  margin-top: 3px;
}
.td-attention-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: #ffe2d2;
  flex-shrink: 0;
}
.td-attention > .icon {
  width: 16px;
}
.td-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.td-section-title h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.05rem;
}
.td-section-title h2 .icon {
  width: 18px;
  height: 18px;
  color: #8596ad;
}
.td-info-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 0;
}
.td-info-row + .td-info-row {
  border-top: 1px solid var(--td-line);
}
.td-row-icon {
  padding-top: 3px;
  color: #8b9bb0;
}
.td-row-icon .icon {
  width: 18px;
  height: 18px;
}
.td-info-row > div {
  flex: 1;
  min-width: 0;
}
.td-label {
  display: block;
  color: var(--td-muted);
  font-size: 0.76rem;
  margin-bottom: 4px;
}
.td-info-row strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.6;
}
.td-info-row small {
  display: block;
  font-size: 0.74rem;
  color: #8693a5;
  margin-top: 3px;
}
.td-map-button {
  display: grid;
  place-items: center;
  align-self: center;
  width: 44px;
  min-height: 44px;
  border: 1px solid #e8eff7;
  background: #f2f7fc;
  border-radius: 12px;
  color: #6183a7;
  flex-shrink: 0;
}
.td-map-button .icon {
  width: 20px;
  height: 20px;
}
.td-contact {
  display: flex;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.td-contact a {
  color: #527ea8;
  font-size: 0.9rem;
}
.td-deadline {
  background: #f6f8fb;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 0.73rem;
  color: var(--td-muted);
}
.td-deadline .icon {
  width: 14px;
  height: 14px;
}
.td-deadline strong {
  color: #66778e;
  font-weight: 400;
  margin-left: auto;
}
.td-description > p {
  font-size: 0.92rem;
  line-height: 1.85;
  color: #526077;
  margin: 0;
}
.td-requirements {
  border-top: 1px solid var(--td-line);
  margin-top: 16px;
  padding-top: 14px;
}
.td-requirements h3 {
  font-size: 0.84rem;
  margin-bottom: 6px;
}
.td-requirements p {
  color: var(--td-muted);
  font-size: 0.86rem;
  line-height: 1.75;
  margin: 0;
}
.td-count {
  color: #8794a5;
  font-size: 0.75rem;
  white-space: nowrap;
}
.td-management .participant {
  padding: 18px 0;
}
.td-management .participant:last-child {
  padding-bottom: 0;
}
.td-management .participant:first-of-type {
  padding-top: 2px;
}
.td-person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.td-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(140deg, #fff1e7, #ffdfce);
  color: #be7854;
  font-size: 0.96rem;
}
.td-person > div {
  flex: 1;
  min-width: 0;
}
.td-person h3 {
  font-size: 0.94rem;
  margin: 0 0 2px;
}
.td-person p {
  font-size: 0.72rem;
  color: var(--td-muted);
  margin: 0;
}
.task-detail .badge {
  font-size: 0.72rem;
  border-radius: 7px;
  padding: 4px 7px;
  white-space: nowrap;
}
.td-management .td-person-message {
  padding: 9px 12px;
  border-radius: 9px;
  background: #f6f8fb;
  margin: 12px 0;
  color: #7c899b;
}
.td-person-actions {
  justify-content: flex-end;
  margin-top: 12px;
}
.td-volunteer-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f5f8fb;
  border-radius: 12px;
}
.td-volunteer-contact > span { min-width: 0; }
.td-volunteer-contact small { display: block; font-size: 0.7rem; color: var(--td-muted); margin-bottom: 3px; }
.td-volunteer-contact strong { font-size: 0.86rem; font-weight: 600; overflow-wrap: anywhere; }
.td-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #ffede4;
  color: #d96848;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.td-call .icon { width: 16px; height: 16px; margin: 0; }
.td-call:focus-visible { outline: 2px solid #d96848; outline-offset: 3px; }
.task-detail .actions :is(.primary, .secondary) {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 0.83rem;
}
.task-detail .primary {
  background: linear-gradient(110deg, #ff8768, #f96357);
  box-shadow: 0 4px 10px #f56a561f;
}
.task-detail .secondary {
  background: #f0f4f8;
  color: #63758b;
}
.task-detail .record-block {
  background: #f7f9fc;
  border: 1px solid #edf1f6;
  padding: 14px;
  margin-bottom: 0;
}
.task-detail .record-block p {
  color: #738297;
  line-height: 1.7;
}
.task-detail .record-block .between {
  flex-wrap: wrap;
  gap: 8px;
}
.td-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0 4px;
}
.td-empty > .icon {
  width: 40px;
  height: 40px;
  color: #c8d4df;
}
.td-empty strong {
  font-weight: 400;
  font-size: 0.88rem;
  color: #64788e;
}
.td-empty p {
  color: #92a0b0;
  font-size: 0.75rem;
  margin: 4px 0 0;
}
.td-cancel-note {
  color: #926d64;
  background: #fff0ea;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.85rem;
}
.td-footer {
  position: fixed;
  z-index: 25;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--bottom-nav-space);
  width: min(100%, var(--mobile-page-width));
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffffffa;
  border-top: 1px solid #edf1f6;
  padding: 12px 18px;
  box-shadow: 0 -6px 25px #263b5908;
}
.td-owner-footer > :is(.primary, .secondary) {
  flex: 1;
  min-height: 46px;
  border-radius: 13px;
  padding: 11px 10px;
  font-size: 0.91rem;
}
.td-more-button {
  border: 0;
  background: none;
  color: #8290a3;
  font-size: 0.67rem;
  min-width: 44px;
  min-height: 46px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  margin-right: 3px;
}
.td-more-button .icon {
  width: 19px;
  height: 19px;
}
.td-volunteer-footer {
  flex-wrap: wrap;
}
.td-volunteer-footer > :is(button, a) {
  flex: 1;
  font-size: 0.82rem;
  padding: 10px;
  min-width: 100px;
  border-radius: 12px;
}
.task-detail .requester-task-focus {
  scroll-margin-top: 18px;
  scroll-margin-bottom: calc(var(--bottom-nav-space) + 90px);
}
.td-tools {
  display: grid;
  gap: 6px;
}
.td-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: #f7f9fc;
  border-radius: 13px;
  padding: 15px 12px;
  color: #53657c;
}
.td-tool > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.td-tool strong,
.td-tool small {
  display: block;
}
.td-tool strong {
  font-size: 0.94rem;
}
.td-tool small {
  font-size: 0.76rem;
  margin-top: 3px;
}
.td-tool > .icon {
  width: 16px;
}
.td-tool-icon .icon {
  width: 20px;
  height: 20px;
}
.td-tool-danger {
  color: #d2685c;
  background: #fff5f2;
  margin-top: 7px;
}
@media (max-width: 359px) {
  .task-detail main {
    padding-inline: 12px;
  }
  .task-detail .card,
  .td-hero {
    padding: 16px;
  }
  .td-hero {
    padding-bottom: 0;
  }
  .td-metrics > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .td-metrics .icon {
    display: none;
  }
  .td-metrics span {
    text-align: center;
  }
  .td-person {
    gap: 8px;
    flex-wrap: wrap;
  }
  .td-person > div {
    min-width: 100px;
  }
  .td-footer {
    padding-inline: 12px;
    gap: 7px;
  }
}
.large-text .task-detail {
  font-size: 1rem;
}
.large-text .td-metrics .icon {
  display: none;
}
.large-text .td-metrics > div {
  grid-template-columns: 1fr;
  text-align: center;
}
.large-text .td-section-title,
.large-text .td-person {
  flex-wrap: wrap;
}
.large-text .td-footer {
  gap: 6px;
}
.large-text .td-owner-footer > :is(.primary, .secondary) {
  font-size: 0.8rem;
}

dialog.service-completion-dialog {
  max-width: 390px;
  padding: 16px 24px 24px;
  border: 1px solid #fff;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffaf6, #fff 65%);
  text-align: center;
}
.service-completion-art {
  display: block;
  width: min(100%, 260px);
  height: auto;
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto 8px;
  border-radius: 20px;
  mix-blend-mode: multiply;
}
.service-completion-form h2 { margin: 0; color: #253a49; font-size: 1.4rem; font-weight: 600; }
.service-completion-message { margin: 10px 0 20px; color: #7e8a94; font-size: .84rem; line-height: 1.7; }
.service-completion-task {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #fff5ed;
  color: #70574a;
  font-size: .84rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.service-completion-task .icon { width: 17px; height: 17px; color: #ff8068; flex-shrink: 0; }
.service-completion-task span { min-width: 0; }
.service-completion-note { margin: 16px 0 22px; color: #8b969e; font-size: .76rem; line-height: 1.8; }
.service-completion-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; }
.service-completion-actions button { min-width: 0; min-height: 48px; padding: 12px 8px; border-radius: 15px; font-size: .94rem; font-weight: 600; }
.service-completion-actions .secondary { background: #f1f4f7; color: #697d8d; border: 0; }
.service-completion-actions .primary { box-shadow: 0 7px 16px #ff766724; }
@media (max-height: 600px) {
  .service-completion-art { max-height: 100px; }
  .service-completion-message { margin-bottom: 12px; }
  .service-completion-note { margin: 12px 0; }
}
