.nighttax-profile-component {
  --nighttax-profile-ink: #2f3e58;
  --nighttax-profile-rose: #ef6a95;
  --nighttax-profile-border: #ebced9;
  --nighttax-profile-white: #fff;
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 20px auto 0;
  color: var(--nighttax-profile-ink);
  font-family: "Yu Gothic", Meiryo, sans-serif;
}

.nighttax-profile-component *,
.nighttax-profile-component *::before,
.nighttax-profile-component *::after {
  box-sizing: border-box;
}

.nighttax-profile-component .nighttax-profile-trigger {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: normal;
  text-align: initial;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  transform: none;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(47, 62, 88, 0.12);
}

.nighttax-profile-component .nighttax-profile-trigger::before,
.nighttax-profile-component .nighttax-profile-trigger::after,
.nighttax-profile-component .nighttax-profile-close::before,
.nighttax-profile-component .nighttax-profile-close::after {
  content: none;
}

.nighttax-profile-component .nighttax-profile-trigger:hover {
  filter: brightness(0.985);
}

.nighttax-profile-component .nighttax-profile-trigger:focus-visible,
.nighttax-profile-component .nighttax-profile-close:focus-visible,
.nighttax-profile-component .nighttax-profile-noscript a:focus-visible {
  outline: 3px solid var(--nighttax-profile-ink);
  outline-offset: 4px;
}

.nighttax-profile-component .nighttax-profile-card-picture,
.nighttax-profile-component .nighttax-profile-portrait-picture {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.nighttax-profile-component .nighttax-profile-card-image,
.nighttax-profile-component .nighttax-profile-portrait-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
}

.nighttax-profile-component .nighttax-profile-card-image {
  aspect-ratio: 780 / 924;
}

.nighttax-profile-component .nighttax-profile-dialog {
  width: min(760px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--nighttax-profile-border);
  border-radius: 18px;
  background: var(--nighttax-profile-white);
  color: var(--nighttax-profile-ink);
  box-shadow: 0 20px 70px rgba(16, 26, 44, 0.24);
  font: inherit;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.nighttax-profile-component .nighttax-profile-dialog::backdrop {
  background: rgba(16, 26, 44, 0.62);
}

.nighttax-profile-component .nighttax-profile-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid var(--nighttax-profile-border);
  background: var(--nighttax-profile-white);
}

.nighttax-profile-component .nighttax-profile-dialog-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--nighttax-profile-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.nighttax-profile-component .nighttax-profile-dialog-title::before,
.nighttax-profile-component .nighttax-profile-dialog-title::after {
  content: none;
}

.nighttax-profile-component .nighttax-profile-close {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  min-height: 44px;
  padding: 7px 10px;
  margin: 0;
  border: 1px solid var(--nighttax-profile-border);
  border-radius: 10px;
  background: var(--nighttax-profile-white);
  box-shadow: none;
  color: var(--nighttax-profile-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  transform: none;
  cursor: pointer;
}

.nighttax-profile-component .nighttax-profile-close:hover {
  background: #fff5f8;
}

.nighttax-profile-component .nighttax-profile-close-mark {
  display: block;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.nighttax-profile-component .nighttax-profile-dialog-content {
  display: block;
  margin: 0;
  padding: 0;
  background: var(--nighttax-profile-white);
}

.nighttax-profile-component .nighttax-profile-portrait-image {
  aspect-ratio: 780 / 1120;
}

.nighttax-profile-component .nighttax-profile-noscript {
  margin: 12px 0 0;
  color: var(--nighttax-profile-ink);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}

@media (min-width: 768px) {
  .nighttax-profile-component .nighttax-profile-card-image {
    aspect-ratio: 2240 / 760;
  }

  .nighttax-profile-component .nighttax-profile-portrait-image {
    aspect-ratio: 1440 / 920;
  }
}

@media (max-width: 767px) {
  .nighttax-profile-component {
    max-width: 430px;
  }
}

@media (max-width: 360px) {
  .nighttax-profile-component .nighttax-profile-dialog-header {
    gap: 8px;
    padding-left: 12px;
    padding-right: 8px;
  }

  .nighttax-profile-component .nighttax-profile-dialog-title {
    font-size: 14px;
  }

  .nighttax-profile-component .nighttax-profile-close {
    min-width: 80px;
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* v5: 情報画像と操作を分離。外部リンクをbuttonに入れない。 */
.nighttax-profile-component .nighttax-profile-trust-card {
  overflow: hidden;
  border: 1px solid var(--nighttax-profile-border);
  border-top: 3px solid var(--nighttax-profile-rose);
  border-radius: 16px;
  background: #fff;
}
.nighttax-profile-component .nighttax-profile-actions { padding: 0 20px 20px; }
.nighttax-profile-component .nighttax-profile-trigger {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 10px; border-radius: 9px;
  background: #f7e6ea; color: #2f3e58;
  font-size: 15px; font-weight: 700; line-height: 1.6; text-align: center;
}
.nighttax-profile-component .nighttax-profile-verification { text-align: center; margin-top: 18px; }
.nighttax-profile-component .nighttax-profile-verify-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 44px; padding: 4px 0; margin: 0;
  color: #2f3e58; background: transparent; border: 0;
  font-size: 14px; font-weight: 600; line-height: 1.6;
  text-decoration: underline; text-underline-offset: 5px;
}
.nighttax-profile-component .nighttax-profile-verify-link:focus-visible {
  outline: 3px solid var(--nighttax-profile-ink); outline-offset: 3px;
}
.nighttax-profile-component .nighttax-profile-verify-note {
  margin: 4px 0 0; padding: 0; color: #516c94;
  font-size: 12px; line-height: 1.8; font-weight: 400;
}
@media (min-width: 768px) {
  .nighttax-profile-component .nighttax-profile-actions {
    display: grid; grid-template-columns: 1fr 1fr; align-items: center;
    gap: 32px; padding: 0 32px 26px;
  }
  .nighttax-profile-component .nighttax-profile-verification { margin-top: 0; }
}
