.showcase-board {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.showcase-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px 14px;
}

.showcase-toolbar h2,
.showcase-dialog-head h2 {
  margin: 0;
  color: var(--ink);
  font: bold clamp(20px, 2.7vw, 25px)/1.3 var(--serif);
}

.showcase-toolbar p,
.showcase-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.showcase-publish { flex: none; min-height: 44px; }
.showcase-empty { padding: 15px; }
.showcase-feed { min-width: 0; }

.showcase-masonry {
  column-count: 2;
  column-gap: 8px;
}

.showcase-card {
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
  vertical-align: top;
  break-inside: avoid;
  border-color: #4b3b32;
  border-radius: 9px;
  background: #232229;
}

.showcase-open {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.showcase-open:focus-visible { outline-offset: -3px; }
.showcase-open:hover .showcase-card-caption { color: var(--gold-light); }

.showcase-cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #15161c;
  border-radius: 8px 8px 0 0;
}

.showcase-cover {
  display: block;
  width: 100%;
  height: auto;
  max-height: 36rem;
  aspect-ratio: auto 4 / 5;
  object-fit: contain;
}

.showcase-photo-count {
  position: absolute;
  inset: auto 6px 6px auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: #14161de8;
  color: #f3ebdf;
  font-size: 11px;
}

.showcase-card-caption {
  display: -webkit-box;
  min-height: 32px;
  padding: 7px 8px 4px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.showcase-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 6px;
  padding: 5px 8px 7px;
  color: var(--muted);
  font-size: 11px;
}

.showcase-card-author { flex: 1 1 32px; min-width: 0; }
.showcase-card-author a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.showcase-card-author a:hover,
.showcase-author a:hover,
.showcase-comment a:hover { color: var(--gold-light); }
.showcase-card-counts { display: inline-flex; align-items: center; gap: 8px; }
.showcase-card-counts > span { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.showcase-card-counts [data-liked="true"] { color: var(--gold-light); }

.showcase-comment-icon {
  position: relative;
  display: inline-block;
  width: 11px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 3px;
}
.showcase-comment-icon::after {
  position: absolute;
  inset: auto auto -3px 2px;
  width: 3px;
  height: 3px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  background: #232229;
  content: "";
  transform: skewY(-34deg);
}

#showcase-dialog {
  width: min(680px, calc(100vw - 24px));
  padding: 0 clamp(13px, 2vw, 22px) clamp(13px, 2vw, 22px);
}
#showcase-dialog:has(.showcase-composer) { width: min(520px, calc(100vw - 24px)); }
.showcase-dialog-body { display: grid; min-width: 0; gap: 13px; }

.showcase-dialog-head {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-inline: calc(-1 * clamp(13px, 2vw, 22px));
  padding: 9px clamp(13px, 2vw, 22px);
  border-bottom: 1px solid #514235;
  background: #1c2028;
}
.showcase-dialog-head .button { flex: none; min-height: 44px; padding-inline: 12px; }
.showcase-dialog-head h2 { min-width: 0; }

.showcase-publish-actions { display: flex; justify-content: flex-end; }
.showcase-publish-actions .button { min-height: 44px; }

.showcase-detail-author { display: flex; align-items: center; gap: 9px; min-width: 0; }
.showcase-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #85664b;
  border-radius: 9px;
  background: #3f2b21;
  color: var(--gold-light);
  font: bold 17px/1 var(--serif);
}
.showcase-author { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.showcase-author time { display: block; }
.showcase-author time,
.showcase-comment time { color: var(--muted); font-size: 12px; }
.showcase-remove { min-height: 44px; padding-inline: 5px; color: var(--muted); }
.showcase-remove:hover { color: #f0b797; }

.showcase-gallery {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-color: #8d674b #22242b;
}
.showcase-gallery figure {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #121419;
  scroll-snap-align: start;
}
.showcase-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(54dvh, 480px);
  object-fit: contain;
}
.showcase-gallery figcaption {
  position: absolute;
  inset: auto 8px 8px auto;
  padding: 3px 7px;
  border-radius: 5px;
  background: #121419e0;
  color: #f3ebdf;
  font-size: 12px;
}

.showcase-caption,
.showcase-comment p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.55;
}
.showcase-actions { display: flex; min-width: 0; padding-bottom: 2px; }
.showcase-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 3px 10px;
  border: 1px solid #514235;
  border-radius: 7px;
  background: #262329;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.showcase-like > span { font-size: 19px; line-height: 1; }
.showcase-like[aria-pressed="true"], .showcase-like:hover { color: var(--gold-light); }

.showcase-comments {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.showcase-comments h3 { margin: 0; font-size: 16px; }
.showcase-comments h3 span { color: var(--muted); font-weight: 500; }
.showcase-comment-body,
.showcase-comment-list,
.showcase-comment-form { display: grid; gap: 8px; min-width: 0; }
.showcase-comment-list { margin: 0; padding: 0; list-style: none; }
.showcase-comment {
  min-width: 0;
  padding: 5px 9px 8px;
  border-radius: 6px;
  background: #161920;
}
.showcase-comment header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; }
.showcase-comment strong { overflow-wrap: anywhere; }
.showcase-comment .showcase-remove { margin-inline-start: auto; }
.showcase-comment p { margin-top: 3px; }
.showcase-comment-form textarea { min-height: 52px; }

.showcase-preview-list:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.showcase-queued-photo {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  place-items: center;
  border-radius: 6px;
  background: #14171d;
  color: var(--muted);
  font-size: 11px;
  aspect-ratio: 1;
}
.showcase-queued-photo img { width: 100%; height: 100%; object-fit: cover; }
.showcase-queued-photo button {
  position: absolute;
  inset: 0 0 auto auto;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0 0 0 7px;
  background: #111319d9;
  color: var(--ink);
  font-size: 19px;
  cursor: pointer;
}

.showcase-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 880px) {
  .showcase-masonry { column-count: 3; column-gap: 12px; }
  .showcase-card { margin-bottom: 12px; }
}

@media (min-width: 1320px) {
  .showcase-masonry { column-count: 4; column-gap: 15px; }
  .showcase-card { margin-bottom: 15px; }
}

@media (max-width: 720px) {
  #showcase-dialog,
  #showcase-dialog:has(.showcase-composer) {
    width: min(600px, 100%);
    padding: 0 13px calc(13px + env(safe-area-inset-bottom));
  }
  .showcase-dialog-head { margin-inline: -13px; padding-inline: 13px; }
}
