dialog {
  border:1px solid var(--border);
  border-radius:12px;
  padding:0;
  width:min(820px,94vw);
  max-height:92dvh;
  box-shadow:0 20px 80px #17372d30;
  color:var(--text)
}
dialog::backdrop {
  background:#142c2466;
  backdrop-filter:blur(2px)
}
.dialog-head {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:18px 24px;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  background:white;
  z-index:1
}
.dialog-head h2 {
  overflow-wrap:anywhere;
  min-width:0
}
.dialog-head button {
  flex-shrink:0
}
#modal-body {
  padding:24px
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px
}
.create-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.record-meta {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color:var(--muted);
  font-size:12px
}
.task-summary {
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  padding:14px;
  background:var(--green-light);
  border-radius:6px
}
.callout {
  padding:14px;
  border:1px solid #f3d9a1;
  border-radius:6px
}
.file-row {
  display:flex;
  gap:12px;
  justify-content:space-between;
  padding:12px;
  border:1px solid var(--border);
  border-radius:6px;
  overflow-wrap:anywhere
}
.file-row span {
  font-size:11px;
  color:var(--muted);
  flex-shrink:0
}
.comment {
  border-left:3px solid #d7e8df;
  padding:4px 14px
}
.history {
  margin:10px 0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:6px
}
summary {
  cursor:pointer;
  font-weight:600;
  padding:5px 0
}
.toolbox {
  background:white;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:var(--shadow);
  overflow:hidden
}
.tool-tabs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:16px;
  background:#f8faf9;
  border-bottom:1px solid var(--border)
}
.tool-tabs button {
  font-size:12px
}
.tool-panel {
  padding:24px;
  max-width:850px
}
.result {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:14px;
  background:var(--green-light);
  border-radius:6px;
  padding:16px;
  margin:0;
  font-variant-numeric:tabular-nums
}
.result:empty {
  display:none
}
.reference-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.reference-card {
  background:white;
  border:1px solid var(--border);
  border-radius:8px;
  padding:16px
}
.reference-card .prose {
  margin-top:12px;
  font-size:13px
}
.login {
  max-width:480px;
  margin:15vh auto;
  padding:32px;
  display:flex;
  flex-direction:column;
  gap:18px;
  background:white;
  border:1px solid var(--border);
  border-radius:12px
}
.login img {
  align-self:start
}
#notice {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  z-index:1000;
  max-width:min(650px,90vw);
  border-radius:8px;
  box-shadow:var(--shadow);
  overflow-wrap:anywhere
}
#notice:not(:empty) {
  padding:14px 20px
}
#notice.error {
  background:#991b1b;
  color:white
}
#notice.success {
  background:#065f46;
  color:white
}
