.chm-showcase {
  --chm-panel: rgba(10, 26, 47, 0.86);
  --chm-panel-2: rgba(16, 40, 67, 0.76);
  --chm-line: rgba(201, 147, 83, 0.44);
  --chm-gold: #e3b56f;
  --chm-text: #eef4fb;
  --chm-muted: #b9c5d4;
  --chm-radius: 22px;
  color: var(--chm-text);
}
.chm-showcase-head {
  margin-bottom: 24px;
}
.chm-showcase-head p {
  margin: 0 0 8px;
  color: var(--chm-gold);
  letter-spacing: .18em;
  font-size: 12px;
}
.chm-showcase-head h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 42px);
}
.chm-showcase-head div,
.chm-empty {
  color: var(--chm-muted);
  line-height: 1.9;
}
.chm-grid {
  display: grid;
  grid-template-columns: repeat(var(--chm-columns, 3), minmax(0, 1fr));
  gap: 22px;
}
.chm-card {
  position: relative;
  transform: translateZ(0);
}
.chm-card-inner {
  position: relative;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--chm-line);
  border-radius: var(--chm-radius);
  background:
    radial-gradient(circle at 24% 8%, rgba(227, 181, 111, .12), transparent 32%),
    linear-gradient(180deg, var(--chm-panel-2), var(--chm-panel));
  box-shadow: 0 18px 56px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.035);
  transition: box-shadow .24s ease, border-color .24s ease;
  overflow: hidden;
}
.chm-card:hover .chm-card-inner {
  border-color: rgba(227,181,111,.76);
  box-shadow: 0 26px 76px rgba(0,0,0,.42), 0 0 34px rgba(227,181,111,.08);
}
.chm-visual-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  margin-bottom: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 72%, rgba(227,181,111,.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  overflow: hidden;
  perspective: 1200px;
}
.chm-image-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: zoom-in;
  transform-style: preserve-3d;
  transition: transform .16s ease;
  will-change: transform;
}
.chm-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.42));
  transform: translateZ(34px);
}
.chm-mode-flat .chm-image {
  transform: none;
}
.chm-shine {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 63%);
  transform: translateX(-48%) rotate(8deg);
  opacity: .42;
  mix-blend-mode: screen;
  transition: transform .24s ease, opacity .24s ease;
}
.chm-image-button:hover .chm-shine,
.chm-image-button.is-tilting .chm-shine {
  transform: translateX(35%) rotate(8deg);
  opacity: .72;
}
.chm-model-viewer {
  width: 100%;
  height: 320px;
  background: transparent;
}
.chm-no-image {
  color: var(--chm-muted);
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 40px 24px;
}
.chm-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.chm-badge,
.chm-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .12em;
}
.chm-badge {
  color: #1d1307;
  background: linear-gradient(180deg, #f4d08f, #c99353);
}
.chm-type {
  color: var(--chm-gold);
  border: 1px solid var(--chm-line);
  background: rgba(201,147,83,.08);
}
.chm-copy h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.45;
}
.chm-copy dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.chm-copy dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.chm-copy dt {
  color: var(--chm-muted);
  font-size: 12px;
}
.chm-copy dd {
  margin: 0;
  text-align: right;
}
.chm-content {
  margin-top: 16px;
  color: var(--chm-muted);
  line-height: 1.9;
}
.chm-card-single {
  max-width: 760px;
  margin-inline: auto;
}
.chm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.78);
}
.chm-lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.chm-lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  color: #fff;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}
@media (max-width: 960px) {
  .chm-grid {
    grid-template-columns: repeat(min(2, var(--chm-columns, 2)), minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .chm-grid {
    grid-template-columns: 1fr;
  }
  .chm-visual-wrap,
  .chm-image-button {
    min-height: 210px;
  }
  .chm-model-viewer {
    height: 270px;
  }
}

/* v0.3.2: card detail modal */
.chm-card[data-chm-modal-trigger] {
  cursor: pointer;
}
.chm-card[data-chm-modal-trigger]:focus-visible .chm-card-inner {
  outline: 3px solid rgba(227,181,111,.82);
  outline-offset: 4px;
}
.chm-more-hint {
  margin: 14px 0 0;
  color: var(--chm-gold);
  font-size: 12px;
  letter-spacing: .08em;
}
.chm-modal-open {
  overflow: hidden;
}
.chm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 18, .82);
  backdrop-filter: blur(8px);
}
.chm-modal-panel {
  position: relative;
  width: min(1080px, 96vw);
  max-height: 90vh;
  overflow: auto;
  color: var(--chm-text, #eef4fb);
  border: 1px solid var(--chm-line, rgba(201,147,83,.44));
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 0%, rgba(227,181,111,.16), transparent 34%),
    linear-gradient(180deg, rgba(16,40,67,.96), rgba(10,26,47,.96));
  box-shadow: 0 34px 120px rgba(0,0,0,.62), inset 0 0 0 1px rgba(255,255,255,.04);
  padding: clamp(18px, 3vw, 34px);
}
.chm-modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  background: rgba(0,0,0,.34);
  color: #fff;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.chm-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  clear: both;
}
.chm-modal-visual {
  min-height: min(60vh, 520px);
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 78%, rgba(227,181,111,.18), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.012));
  overflow: hidden;
  perspective: 1200px;
}
.chm-modal-image-tilt {
  min-height: min(56vh, 500px);
}
.chm-modal-image-tilt .chm-image {
  max-height: min(56vh, 500px);
}
.chm-modal-copy h3 {
  margin: 10px 0 18px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.25;
}
.chm-modal-copy dl {
  display: grid;
  gap: 10px;
  margin: 0;
}
.chm-modal-copy dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.chm-modal-copy dt {
  color: var(--chm-muted, #b9c5d4);
  font-size: 13px;
}
.chm-modal-copy dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}
.chm-modal-copy .chm-content {
  margin-top: 22px;
  color: var(--chm-muted, #b9c5d4);
  line-height: 1.95;
}
@media (max-width: 780px) {
  .chm-modal-overlay {
    padding: 12px;
  }
  .chm-modal-grid {
    grid-template-columns: 1fr;
  }
  .chm-modal-visual,
  .chm-modal-image-tilt {
    min-height: 300px;
  }
  .chm-modal-image-tilt .chm-image {
    max-height: 330px;
  }
}

/* v0.3.5: more link and archive page */
.chm-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.chm-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid rgba(227,181,111,.72);
  border-radius: 999px;
  color: #1d1307;
  background: linear-gradient(180deg, #f4d08f, #c99353);
  box-shadow: 0 14px 34px rgba(0,0,0,.22), 0 0 28px rgba(227,181,111,.12);
  text-decoration: none;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.chm-more-button:hover,
.chm-more-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0,0,0,.28), 0 0 36px rgba(227,181,111,.18);
  filter: brightness(1.04);
  color: #1d1307;
  text-decoration: none;
}
.chm-more-button span {
  font-size: 12px;
  font-weight: 600;
  opacity: .78;
}
.chm-archive-page {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 72px;
}
.chm-archive-page .chm-showcase {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(201,147,83,.32);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(227,181,111,.12), transparent 36%),
    linear-gradient(180deg, rgba(10,26,47,.88), rgba(6,16,30,.88));
  box-shadow: 0 22px 70px rgba(0,0,0,.22);
}
@media (max-width: 640px) {
  .chm-more-button {
    width: 100%;
  }
  .chm-archive-page {
    width: min(100% - 20px, 1180px);
    margin: 28px auto 48px;
  }
}
