.cj-page {
  padding-block: clamp(22px, 3.5vw, 50px) clamp(50px, 7vw, 92px);
  min-height: 70vh;
}
.cj-page .crumb {align-items: baseline; flex-wrap: wrap;}
.cj-head, .cj-tools, .cj-actions, .cj-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cj-head, .cj-tools {justify-content: space-between;}
.cj-head {
  align-items: flex-end;
  padding: clamp(25px, 3.8vw, 50px) 0;
  border-bottom: 1px solid var(--line);
}
.cj-head h1 {
  font-size: clamp(2.35rem, 4.2vw, 4rem);
  line-height: 1.13;
  letter-spacing: -.045em;
}
.cj-head p, .cj-empty p {margin-top: 10px; color: var(--muted);}
.cj-notice:not(:empty) {margin: 18px 0; color: var(--forest);}
.cj-tools {padding-block: 20px;}
.cj-filters {margin: 0;}
.cj-count, .cj-visibility {font-size: .875rem; color: var(--muted);}
.cj-month {
  display: grid;
  grid-template-columns: minmax(92px, .65fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(16px, 2.2vw, 35px);
  border-top: 1px solid var(--line);
  padding-block: clamp(21px, 2.2vw, 35px);
}
.cj-month h2 {
  color: var(--muted);
  line-height: 1.5;
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}
.cj-month h2 b {display: block; font-size: 1.65rem; color: var(--ink);}
.cj-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px clamp(15px, 2vw, 28px);
}
.cj-card {min-width: 0;}
.cj-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.55;
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #e9ebe5;
}
.cj-image img {width: 100%; height: 100%; object-fit: cover;}
.cj-image.cj-document {background: #ebece6;}
.cj-document img {object-fit: contain;}
.cj-expand {
  display: grid;
  place-items: center;
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fffffff0;
  color: var(--forest);
}
.cj-expand .icon {width: 15px; height: 15px;}
.cj-meta {gap: 8px; margin-top: 11px;}
.cj-meta time {font: 500 .875rem var(--mono); color: var(--muted);}
.cj-visibility {margin-left: auto;}
.cj-card p {white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px;}
.cj-edit, .cj-empty a, .cj-delete {text-decoration: underline; text-underline-offset: 4px;}
.cj-edit {padding: 8px 0; color: var(--muted); font-size: .875rem;}
.cj-empty {padding: clamp(35px, 6vw, 76px) 0;}
.cj-empty h2 {font-size: 1.35rem;}
.cj-empty a, .cj-empty button {display: inline-block; margin-top: 12px;}
.cj-modal {
  width: min(560px, calc(100vw - 26px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
}
.cj-modal::backdrop {background: #17231dd4;}
.cj-form > header, .cj-form > footer, .cj-delete-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px clamp(16px, 4vw, 28px);
}
.cj-form > header {justify-content: space-between; border-bottom: 1px solid var(--line);}
.cj-form h2 {font-size: 1.38rem; margin: 0;}
.cj-form .iconbtn {padding: 6px; display: grid; place-items: center;}
.cj-form-body {display: grid; gap: 17px; padding: 18px clamp(16px, 4vw, 28px);}
.cj-form-row {display: grid; gap: 12px; grid-template-columns: 1fr 1fr;}
.cj-form label {display: block; font-weight: 600; min-width: 0;}
.cj-form label > :is(input, select, textarea):not([type=checkbox]) {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #c3cabe;
  border-radius: 4px;
  padding: 9px 10px;
  margin-top: 5px;
  font: 400 1rem/1.5 var(--font);
  color: var(--ink);
  background: white;
}
.cj-form textarea {resize: vertical;}
.cj-form label small {color: var(--muted); font-size: .875rem; font-weight: 400;}
.cj-form input[type=file]::file-selector-button {padding: 5px 8px; margin-right: 9px; cursor: pointer;}
.cj-preview {border-radius: 5px; overflow: hidden; background: #eaece5;}
.cj-preview img {height: 116px; width: 100%; object-fit: contain;}
.cj-form .cj-share {display: flex; align-items: flex-start; gap: 10px;}
.cj-share input {margin: .35rem 0 0; width: 17px; height: 17px; accent-color: var(--forest); flex-shrink: 0;}
.cj-share small {display: block; margin-top: 2px;}
.cj-status:empty {display: none;}
.cj-status {color: var(--forest);}
.cj-form > footer, .cj-delete-confirm {border-top: 1px solid var(--line); justify-content: flex-end;}
.cj-delete {margin-right: auto; color: #903d2a; padding: 8px 0;}
.cj-delete-confirm {flex-wrap: wrap; background: #fbf0e9;}
.cj-delete-confirm p {width: 100%;}
.cj-danger {background: #873c29; color: white; border-radius: 5px; padding: 12px 18px;}
@media (max-width: 950px) {
  .cj-grid {grid-template-columns: repeat(2, minmax(0, 1fr));}
}
@media (max-width: 680px) {
  .cj-head {align-items: flex-start; gap: 18px;}
  .cj-head, .cj-tools {flex-direction: column;}
  .cj-tools {align-items: flex-start; gap: 5px;}
  .cj-actions {gap: 8px;}
  .cj-actions :is(a,button), .cj-form footer :is(.dark-btn,.outline) {padding: 12px 15px;}
  .cj-month {display: block;}
  .cj-month h2 {margin-bottom: 14px;}
  .cj-month h2 b {display: inline; font-size: 1.1rem; margin-left: 4px;}
  .cj-filters {gap: 6px;}
  .cj-filters button {padding: 7px 10px;}
}
@media (max-width: 500px) {
  .cj-grid {grid-template-columns: minmax(0,1fr);}
}
