/* Base */

.hanbaiten-wrapper {
  display: grid;
  grid-gap: 60px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .hanbaiten-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 60px 90px;
    align-items: stretch;
  }
}

.hanbaiten-wrapper p { line-height: 1.3; margin: 0; }
.hanbaiten-wrapper h3 { margin-top: 0; min-height: 55px; }
.hanbaiten-wrapper span.department {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: inherit;
  color: #21252b;
  position: relative; top: -2px; /* subtle lift */
  font-size: 19px;
}

/* Card layout */
.hanbaiten-wrapper article {
  display: grid;                /* rows stack with gap */
  grid-auto-rows: max-content;
  row-gap: .5rem;
  padding: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid #eff3f5;
  background: hsl(200, 23%, 98%);
}

@media (min-width: 768px) {
  .hanbaiten-wrapper article {
    border: 1px solid #e0e7eb;
    padding-bottom: 16px;
    border-radius: 12px;
    background: hsl(200, 23%, 98%);
  }
}

/* Default row: label | value */
.hanbaiten-wrapper article p {
  display: grid;
  grid-template-columns: 9em 1fr;
  column-gap: 12px;
  align-items: start;
  justify-items: start;
}

/* Email row: label | button | output */
.hanbaiten-wrapper article p.email {
  grid-template-columns: 9em max-content 1fr;
}
.hanbaiten-wrapper article p > strong { grid-column: 1; white-space: nowrap; }
.hanbaiten-wrapper article p.email .copy-email-btn { grid-column: 2; }
.hanbaiten-wrapper article p.email .email-out     { grid-column: 3; }


@media (max-width: 767px) {
   
    .hanbaiten-wrapper article p > strong { grid-area: 1 / 1 / 2 / 2; grid-column: 1; }
    .hanbaiten-wrapper article p.email .copy-email-btn { grid-area: 1 / 2 / 2 / 3; grid-column: 2; }
    .hanbaiten-wrapper article p.email .email-out  { grid-area: 2 / 2 / 3 / 3; grid-column: 2;  }
}

/* Homepage link spans full width */
.hanbaiten-wrapper article a.homepage {
  grid-column: 1 / -1;      /* span both columns */
  display: inline-block;
  margin-top: .75rem;
  word-break: break-all;     /* long URLs won’t overflow */
  text-underline-offset: 2px;
}

/* Copy button styling */
.copy-email-btn {
  display: inline-block;
  padding: 0.4em 1em;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background-color: #144880;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.4;
  transition: background-color .2s ease, transform .1s ease;
}
.copy-email-btn:hover   { background-color: #0e3967; }
.copy-email-btn:active  { transform: scale(0.97); }
.copy-email-btn:disabled{ background-color: #ccc; cursor: not-allowed; }

/* Responsive */
@media (max-width: 640px){
  .hanbaiten-wrapper article p {
    grid-template-columns: 7.5em 1fr;
  }
  .hanbaiten-wrapper article p.email {
    grid-template-columns: 7.5em max-content 1fr;
  }
}
