body {
  background: #f7f8fb;
}

.navbar-brand {
  letter-spacing: .02em;
}

.category-card {
  color: inherit;
  border: 1px solid rgba(0,0,0,.08);
  transition: transform .12s ease, box-shadow .12s ease;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,.08);
}

.category-card-link {
  color: inherit;
  display: block;
  flex: 1 1 auto;
}

.category-card-link:hover {
  color: inherit;
}

.category-card-toolbar {
  min-height: 2rem;
  padding: .25rem .4rem 0;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: #6c757d;
  font-size: 1.3rem;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.drag-handle:hover,
.drag-handle:focus-visible {
  color: #212529;
  background: #eef0f3;
  outline: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-hint-icon {
  font-size: 1.05rem;
  vertical-align: -.05em;
}

.category-sort-ghost {
  opacity: .35;
}

.category-sort-chosen .category-card {
  box-shadow: 0 1rem 2rem rgba(0,0,0,.12);
}

.category-sort-drag .category-card {
  transform: rotate(.4deg);
}

.search-box {
  width: min(560px, 100%);
}

.empty-box {
  border: 1px dashed rgba(0,0,0,.18);
  background: #fff;
  border-radius: .75rem;
}

.form-wrap {
  max-width: 820px;
}

.card {
  border-radius: .75rem;
}

.table th {
  font-size: .85rem;
  color: #6c757d;
  font-weight: 700;
  background: #fafafa;
}

.url-text {
  max-width: 520px;
}

.memo-cell {
  max-width: 260px;
  white-space: pre-wrap;
}

.path-cell {
  max-width: 360px;
  word-break: break-all;
}

code {
  color: #374151;
  background: #f1f3f5;
  padding: .15rem .25rem;
  border-radius: .25rem;
}

.user-email {
  font-size: .72rem;
}

.login-shell {
  min-height: calc(100vh - 9rem);
}

.login-card {
  max-width: 480px;
}

.form-wrap-wide,
.settings-wrap {
  max-width: 1080px;
}

.share-check-col {
  width: 5rem;
}

.share-role-select {
  min-width: 9rem;
}

.category-card-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr);
  gap: 1.25rem;
  align-items: stretch;
}

.category-card-summary {
  min-width: 0;
}

.category-file-preview {
  min-width: 0;
  border-left: 1px solid rgba(0,0,0,.09);
  padding-left: 1.1rem;
}

.category-file-preview-title {
  color: #6c757d;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: .45rem;
}

.category-file-preview-list {
  display: grid;
  gap: .3rem;
}

.category-file-preview-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .45rem;
  font-size: .84rem;
}

.category-file-kind {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: .3rem;
  font-size: .67rem;
  font-weight: 800;
}

.category-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-wrap {
  max-width: 1440px;
}

.history-log-table td {
  vertical-align: top;
}

.history-user-cell,
.history-entity-name {
  max-width: 260px;
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .category-card-content {
    grid-template-columns: 1fr;
  }

  .category-file-preview {
    border-left: 0;
    border-top: 1px solid rgba(0,0,0,.09);
    padding-left: 0;
    padding-top: .9rem;
  }
}

.history-details summary {
  color: #6c757d;
  cursor: pointer;
  font-size: .78rem;
}

.history-details-json {
  max-width: 720px;
  max-height: 320px;
  overflow: auto;
  padding: .75rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .5rem;
  background: #f8f9fa;
  color: #343a40;
  font-size: .73rem;
  white-space: pre-wrap;
  word-break: break-word;
}
