/* Native detail dialog: all layout and motion stays in this external sheet. */
.ds-sheet {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(680px, 92vw);
  max-width: none;
  height: auto;
  max-height: 85dvh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(20, 24, 43, .22), 0 4px 14px rgba(20, 24, 43, .10);
  font: inherit;
  opacity: 0;
  transform: scale(.96) translateY(6px);
  transition: opacity 280ms cubic-bezier(.23, 1, .32, 1), transform 280ms cubic-bezier(.23, 1, .32, 1);
}
.ds-sheet[open] { display: flex; flex-direction: column; }
.ds-sheet.ds-open { opacity: 1; transform: none; }
.ds-sheet::backdrop { background: rgba(20, 24, 43, .32); }
.ds-sheet *, .ds-sheet *::before, .ds-sheet *::after { box-sizing: border-box; }
.ds-sheet [hidden] { display: none !important; }
.ds-frame { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.ds-head { display: flex; flex: none; align-items: flex-start; gap: 12px; margin: 0; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.ds-title-wrap { flex: 1; min-width: 0; }
.ds-sheet .ds-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: normal;
}
.ds-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.ds-badges:empty { display: none; }
.ds-sheet .ds-close {
  flex: none;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ds-sheet .ds-close:active { transform: scale(.97); }
.ds-body { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px; }
.ds-actions { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); }
.ds-sheet .dt-body-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; color: var(--ink); margin: 0; }
.ds-sheet .dt-section-title { font-size: 12px; color: var(--muted); margin: 20px 0 8px; letter-spacing: .04em; }
.ds-sheet .dt-section-title:first-of-type { margin-top: 14px; }
.ds-sheet .dt-empty { color: var(--muted); font-size: 13px; }
.ds-sheet .dt-rename-input { flex: 1; min-width: 0; width: auto; min-height: 36px; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--ink); background: var(--base); font: inherit; }
.ds-sheet .dt-btn { border: 1px solid var(--line); border-radius: 9px; padding: 7px 13px; background: var(--base); color: var(--ink); cursor: pointer; font: inherit; }
.ds-sheet .dt-btn-primary { background: #e9efdf; border-color: #cbd5c5; color: #425c45; font-weight: 650; }
.ds-sheet .dt-error { color: #925541; font-size: 12px; flex-basis: 100%; margin: 0; }
@media (max-width: 800px) {
  .ds-sheet { inset: auto 0 0; margin: 0; width: 100%; height: 92dvh; max-height: 92dvh; border-radius: 16px 16px 0 0; transform: translateY(100%); transition-duration: 300ms; transition-timing-function: cubic-bezier(.32, .72, 0, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .ds-sheet { transform: none; transition: opacity 120ms; }
}
