.hsp-reform-case-block {
  --hsp-reform-case-green: #71b800;
  --hsp-reform-case-green-dark: #365f00;
  --hsp-reform-case-border: #dfe6d5;
  --hsp-reform-case-text: #1f2933;
  --hsp-reform-case-muted: #667085;
  --hsp-reform-case-bg: #fff;
  box-sizing: border-box;
  width: min(100%, calc(100vw - 20px));
  margin: 18px 0;
  overflow: hidden;
  background: var(--hsp-reform-case-bg);
  border: 1px solid var(--hsp-reform-case-border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(31, 41, 51, 0.06);
  color: var(--hsp-reform-case-text);
}

.hsp-reform-case-block *,
.hsp-reform-case-block *::before,
.hsp-reform-case-block *::after {
  box-sizing: inherit;
}

.article .hsp-reform-case-block__title,
.hsp-reform-case-block__title {
  margin: 0;
  padding: 12px 12px 0;
  background: none;
  border: 0;
  color: var(--hsp-reform-case-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
}

.article .hsp-reform-case-block__title::before,
.article .hsp-reform-case-block__title::after,
.hsp-reform-case-block__title::before,
.hsp-reform-case-block__title::after {
  display: none;
  content: none;
}

.hsp-reform-case-block__title-link {
  color: inherit;
  text-decoration: none;
}

.hsp-reform-case-block__title-link:hover {
  text-decoration: underline;
}

.hsp-reform-case-block__images {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.hsp-reform-case-block__images--pair {
  align-items: flex-start;
  grid-template-columns: minmax(0, 36%) minmax(0, calc(64% - 8px));
}

.hsp-reform-case-block__image-card {
  position: relative;
  min-width: 0;
  min-height: 136px;
  margin: 0;
  overflow: hidden;
  background: #f8f8f8;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
}

.hsp-reform-case-block__image-card--after {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.hsp-reform-case-block__images--pair .hsp-reform-case-block__image-card--before {
  min-height: 108px;
}

.hsp-reform-case-block__images--pair .hsp-reform-case-block__image-card--after {
  min-height: 148px;
}

.hsp-reform-case-block__image-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
}

.hsp-reform-case-block__image-card--after .hsp-reform-case-block__image-link {
  overflow: hidden;
  background: #f8f8f8;
  border: 2px solid rgba(113, 184, 0, 0.55);
  border-radius: 8px;
}

.hsp-reform-case-block__image-link > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hsp-reform-case-block__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.hsp-reform-case-block .reform-case-before-after-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 10;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(31, 41, 51, 0.12);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.hsp-reform-case-block .border-hapisumu-label-gray {
  color: #aaa;
}

.hsp-reform-case-block .border-hapisumu-title-orange {
  color: #fe9000;
}

.hsp-reform-case-block__table-wrap {
  min-width: 0;
  width: 100%;
  padding: 0 10px 12px;
}

.hsp-reform-case-block__content--table-aside {
  display: grid;
  align-items: flex-start;
  grid-template-columns: minmax(0, 36%) minmax(0, calc(64% - 8px));
  column-gap: 8px;
  row-gap: 2px;
  padding: 10px;
}

.hsp-reform-case-block__content--table-aside .hsp-reform-case-block__images {
  display: contents;
}

.hsp-reform-case-block__content--table-aside .hsp-reform-case-block__image-card--before {
  grid-column: 1;
  grid-row: 1;
}

.hsp-reform-case-block__content--table-aside .hsp-reform-case-block__image-card--after {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table-wrap {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  padding: 0;
}

.hsp-reform-case-block__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.35;
}

.hsp-reform-case-block__table tbody,
.hsp-reform-case-block__table tr {
  display: block;
}

.hsp-reform-case-block__table th,
.hsp-reform-case-block__table td {
  display: block;
  min-width: 0;
  padding: 0;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hsp-reform-case-block__table th {
  display: none;
  color: var(--hsp-reform-case-green-dark);
  font-weight: 700;
  text-align: left;
}

.hsp-reform-case-block__table td {
  color: var(--hsp-reform-case-text);
  font-weight: 600;
  text-align: right;
}

.hsp-reform-case-block__table-row {
  margin: 0;
  padding: 3px 5px;
  border-radius: 3px;
}

.hsp-reform-case-block__table-row:nth-child(odd) {
  background: #f8f8f8;
}

.hsp-reform-case-block__table-row:nth-child(even) {
  background: #fff;
}

.hsp-reform-case-block__table-row--inline-label {
  display: block;
  text-align: right;
  white-space: nowrap;
}

.hsp-reform-case-block__table-row--inline-label th,
.hsp-reform-case-block__table-row--inline-label td {
  display: inline;
}

.hsp-reform-case-block__table-row--inline-label th {
  color: var(--hsp-reform-case-text);
  font-weight: 600;
}

.hsp-reform-case-block__table-row--inline-label th::after {
  content: " ";
  white-space: pre;
}

.hsp-reform-case-block__table-row--building-structure {
  display: none;
}

.article .hsp-reform-case-block__theme-note,
.hsp-reform-case-block__theme-note {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: var(--hsp-reform-case-text);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

.hsp-reform-case-block__image-card--after .hsp-reform-case-block__theme-note {
  margin-top: 2px;
}

.article .hsp-reform-case-block__free-comment,
.hsp-reform-case-block__free-comment {
  margin: 8px 10px 12px;
  color: var(--hsp-reform-case-text);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.hsp-reform-case-block__content--table-aside .hsp-reform-case-block__free-comment {
  grid-column: 1 / -1;
  margin: 6px 0 0;
}

@media (max-width: 759px) {
  .hsp-reform-case-block__table-value--fit-s {
    font-size: 10px;
  }

  .hsp-reform-case-block__table-value--fit-xs {
    font-size: 9px;
  }
}

.hsp-reform-case-block__lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.86);
}

.hsp-reform-case-block__lightbox.is-open {
  display: flex;
}

.hsp-reform-case-block__lightbox-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hsp-reform-case-block__lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 960px);
  max-height: calc(100vh - 36px);
  margin: 0;
  color: #fff;
  text-align: center;
}

.hsp-reform-case-block__lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 90px);
  object-fit: contain;
  background: #111827;
  border-radius: 8px;
}

.hsp-reform-case-block__lightbox-panel figcaption {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

.hsp-reform-case-block__lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

@media (min-width: 760px) {
  .article .hsp-reform-case-block__title,
  .hsp-reform-case-block__title {
    padding: 14px 14px 0;
  }

  .hsp-reform-case-block__images {
    gap: 10px;
    padding: 12px 14px;
  }

  .hsp-reform-case-block__images--pair {
    grid-template-columns: minmax(0, 46%) minmax(0, calc(54% - 10px));
  }

  .hsp-reform-case-block__images:not(.hsp-reform-case-block__images--pair) {
    display: block;
  }

  .hsp-reform-case-block__image-card {
    min-height: 160px;
  }

  .hsp-reform-case-block__images--pair .hsp-reform-case-block__image-card--before {
    min-height: 120px;
  }

  .hsp-reform-case-block__images--pair .hsp-reform-case-block__image-card--after {
    min-height: 164px;
  }

  .hsp-reform-case-block__content--table-aside {
    grid-template-columns: minmax(0, 46%) minmax(0, calc(54% - 10px));
    column-gap: 10px;
    row-gap: 2px;
    padding: 12px 14px 14px;
  }

  .hsp-reform-case-block__table-wrap {
    padding: 0 14px 14px;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table-wrap {
    width: fit-content;
    max-width: 100%;
    justify-self: end;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table {
    width: auto;
    max-width: 100%;
    table-layout: auto;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table tbody {
    display: table-row-group;
  }

  .hsp-reform-case-block__table .hsp-reform-case-block__table-row,
  .hsp-reform-case-block__table .hsp-reform-case-block__table-row--inline-label {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 6px;
    padding: 2px 5px;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table .hsp-reform-case-block__table-row,
  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table .hsp-reform-case-block__table-row--inline-label {
    display: table-row;
    width: auto;
    max-width: none;
  }

  .hsp-reform-case-block__table th,
  .hsp-reform-case-block__table td,
  .hsp-reform-case-block__table-row--inline-label th,
  .hsp-reform-case-block__table-row--inline-label td {
    display: block;
    color: var(--hsp-reform-case-green-dark);
    font-weight: 700;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table th,
  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table-row--inline-label th {
    display: table-cell;
    white-space: nowrap;
  }

  .hsp-reform-case-block__table td,
  .hsp-reform-case-block__table-row--inline-label td {
    color: var(--hsp-reform-case-text);
    font-weight: 600;
    text-align: left;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table td,
  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table-row--inline-label td {
    display: table-cell;
    white-space: nowrap;
  }

  .hsp-reform-case-block__table-row--inline-label {
    text-align: left;
    white-space: normal;
  }

  .hsp-reform-case-block__table-row--inline-label th::after {
    content: none;
  }

  .hsp-reform-case-block__table th,
  .hsp-reform-case-block__table td {
    padding: 0;
  }

  .hsp-reform-case-block__content--table-aside .hsp-reform-case-block__table th {
    padding-right: 6px;
  }

}
