/* Older HIBARI pages store ordinary WordPress blocks with tks-/tkb- classes. */
.hb-site .hb-main :is(.tks-hero, .tkb-hero) {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: grid;
  align-content: center;
  justify-content: stretch;
  min-height: clamp(540px, 41.5vw, 760px);
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(125px, 9vw, 158px) max(10vw, calc((100% - 1320px) / 2)) clamp(82px, 7vw, 110px);
  background-color: #536e55;
  color: white;
}

/* Some installations retain the inner-container wrapper from older group markup. */
.hb-site .hb-main :is(.tks-hero, .tkb-story, .tkb-line, .tks-step, .tks-doc) > .wp-block-group__inner-container {
  display: contents;
}
.hb-site .hb-main :is(.tks-hero, .tks-hero > .wp-block-group__inner-container) > :is(figure, .wp-block-image) {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
  float: none;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.hb-site .hb-main :is(.tks-hero, .tks-hero > .wp-block-group__inner-container) > :is(figure, .wp-block-image) :is(figure, a, picture, img) {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0;
}
.hb-site .hb-main :is(.tks-hero, .tks-hero > .wp-block-group__inner-container) > :is(figure, .wp-block-image) img {
  object-fit: cover;
  object-position: 57% 50%;
  border-radius: 0;
}
.hb-site .hb-main :is(.tks-hero, .tks-hero > .wp-block-group__inner-container) > :is(figure, .wp-block-image) figcaption {
  position: absolute;
  inset: auto 1.4em 1em auto;
  max-width: 45%;
  color: #fff;
  background: #263a2be6;
  padding: .2em .65em;
  z-index: 1;
}
.hb-site .hb-main .tks-hero::before,
.hb-site .hb-main .tkb-hero .wp-block-cover__background {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(90deg, #243d29b8, #43553783 37%, #6370590d 71%, transparent);
  opacity: 1;
  pointer-events: none;
}
.hb-site .hb-main .tkb-hero .wp-block-cover__image-background {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero)::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: clamp(32px, 5.5vw, 93px);
  background: url('wave.svg') center / 100% 100% no-repeat;
  pointer-events: none;
}
.hb-site .hb-main .tks-hero .tks-copy,
.hb-site .hb-main .tkb-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 45rem;
  margin: 0 !important;
  color: white;
  text-shadow: 0 1px 4px #24392780;
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero) h1 {
  max-width: 9.8em;
  margin: 0 0 .35em;
  color: white;
  font: 500 clamp(40px, 4.4vw, 74px)/1.38 var(--serif);
  letter-spacing: .055em;
}
.hb-site .hb-main .tkb-kicker {
  margin: 0 0 1em;
  font: 600 .76rem/1.5 var(--sans);
  letter-spacing: .15em;
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero) p:not(.tkb-kicker) {
  max-width: 34em;
  margin: 0 0 1em;
  font: 500 clamp(16px, 1.22vw, 21px)/1.8 var(--serif);
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero, .tkb-section, .tkb-dark) .wp-block-buttons {
  margin: 1em 0 0;
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero, .tkb-section, .tkb-dark) .wp-block-button__link,
.hb-site .hb-main .tks-legal-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  border: 1px solid #5a7455;
  border-radius: 2em;
  padding: .55em 1.35em;
  background: #eff4df;
  color: #294838;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  font: 500 1rem/1.55 var(--sans);
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero) .wp-block-button__link {
  background: #fff8df;
  border-color: #fff8df;
}
.hb-site .hb-main :is(.tks-hero, .tkb-hero, .tkb-section, .tkb-dark) .wp-block-button__link:hover,
.hb-site .hb-main .tks-legal-row a:hover {
  background: #dfeaca;
  color: #203b2c;
}

.hb-site .hb-main .tkb-story {
  display: grid;
  grid-template-columns: 1.12fr repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.8vw, 52px);
  align-items: center;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(20px, 2vw, 34px) clamp(22px, 6.2vw, 100px) clamp(38px, 4vw, 70px);
  background: var(--paper);
}
.hb-site .hb-main .tkb-story :is(.tkb-intro, .tkb-moment) {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}
.hb-site .hb-main .tkb-intro h2 {
  margin: 0 0 .42em;
  font-size: clamp(25px, 2.4vw, 39px);
}
.hb-site .hb-main .tkb-moment {
  text-align: center;
}
.hb-site .hb-main .tkb-moment figure {
  width: 100%;
  max-width: none;
  margin: 0 !important;
}
.hb-site .hb-main .tkb-moment img {
  width: 100%;
  aspect-ratio: 1.64;
  object-fit: cover;
  border-radius: 50% 50% 55% 31% / 63% 47% 49% 38%;
}
.hb-site .hb-main .tkb-moment:nth-child(3) img {
  border-radius: 48% 52% 38% 58% / 61% 58% 42% 39%;
}
.hb-site .hb-main .tkb-moment:nth-child(4) img {
  border-radius: 40% 64% 45% 50% / 50% 58% 43% 51%;
}
.hb-site .hb-main .tkb-moment h3 {
  font-size: clamp(20px, 1.7vw, 28px);
  margin: .42em 0 .04em;
}
.hb-site .hb-main .tkb-story p {
  margin: 0;
  font-size: .91rem;
  color: var(--sub);
}

.hb-site .hb-main :is(.tkb-section, .tkb-dark, .tks-page-intro) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(36px, 4vw, 66px) max(6.2vw, calc((100% - 1120px) / 2));
  scroll-margin-top: 20px;
}
.hb-site .hb-main .tks-page-intro {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(95deg, #e4efda, #f8f1c9 62%, #fff9df);
}
.hb-site .hb-main .tks-page-intro h1 {
  margin: 0 0 .25em;
  font-size: clamp(34px, 4vw, 62px);
}
.hb-site .hb-main :is(.tkb-section, .tkb-dark, .tks-page-intro) p:last-child {
  margin-bottom: 0;
}
.hb-site .hb-main :is(.tkb-section, .tkb-dark) + :is(.tkb-section, .tkb-dark) {
  border-top: 1px solid var(--rule);
}
.hb-site .hb-main :is(.tkb-dark, .tks-faq, .tks-public-source, .tks-recruit) {
  background: #eef5e5;
}
.hb-site .hb-main :is(.tkb-line, .tks-doc, .tks-step, .tks-legal-row) {
  display: grid;
  grid-template-columns: minmax(10em, .8fr) minmax(0, 2fr);
  gap: 1.4em;
  align-items: start;
  margin: 0;
  padding: 1.15em 0;
  border-top: 1px solid var(--rule);
}
.hb-site .hb-main :is(.tkb-line, .tks-doc, .tks-step, .tks-legal-row) h3 {
  margin: 0;
}
.hb-site .hb-main .tks-step {
  grid-template-columns: auto minmax(0, 1fr);
}
.hb-site .hb-main .tks-step-no {
  display: grid;
  place-items: center;
  margin: 0;
  width: 2.7em;
  height: 2.7em;
  border-radius: 50%;
  color: #375540;
  background: #e4edd3;
  font: 600 1.15rem/1 var(--sans);
}
.hb-site .hb-main .tks-legal-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}
.hb-site .hb-main .tks-num {
  color: var(--leaf);
  font: 500 1.65rem/1.3 var(--serif);
}
.hb-site .hb-main :is(.tks-legal-section, .tks-document) {
  border-top: 1px solid var(--rule);
  margin: 0;
  padding: 1.3em 0;
}
.hb-site .hb-main .tks-legal-section h2 {
  font-size: clamp(22px, 2.2vw, 32px);
}
.hb-site .hb-main .tks-notice {
  background: #f8efce;
  border-left: 4px solid #9d7837;
  padding: .9em 1.2em;
}
.hb-site .hb-main .tks-pending {
  color: var(--sub);
  font-size: .9rem;
}
.hb-site .hb-main :is(.tks-v6-nav, .hb-legacy-nav) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  margin: 1.4em 0 0;
  border-radius: .4em;
  background: var(--rule);
}
.hb-site .hb-main > :is(.tks-v6-nav, .hb-legacy-nav) {
  width: min(100% - 44px, 1120px);
  margin: 1.4em auto;
}
.hb-site .hb-main :is(.tks-v6-nav, .hb-legacy-nav) > * {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 50px;
  padding: .8em 1em;
  text-decoration: none;
  color: var(--ink);
  background: #f4f8e9;
}
.hb-site .hb-main :is(.tks-v6-nav, .hb-legacy-nav) small {font-size: .75rem}
.hb-site .hb-main :is(.tks-v6-nav, .hb-legacy-nav) a:hover {
  background: #e4edd6;
  text-decoration: underline;
}

@media (max-width: 1050px) {
  .hb-site .hb-main .tkb-story {grid-template-columns: repeat(3, minmax(0, 1fr))}
  .hb-site .hb-main .tkb-intro {grid-column: 1 / -1}
}
@media (max-width: 600px) {
  .hb-site .hb-main :is(.tks-hero, .tkb-hero) {
    min-height: 505px;
    padding: 110px 26px 72px;
  }
  .hb-site .hb-main :is(.tks-hero, .tkb-hero) h1 {font-size: clamp(34px, 8.8vw, 46px)}
  .hb-site .hb-main :is(.tks-hero, .tks-hero > .wp-block-group__inner-container) > :is(figure, .wp-block-image) img {object-position: 62% 50%}
  .hb-site .hb-main .tkb-story {grid-template-columns: 1fr; gap: 20px}
  .hb-site .hb-main .tkb-moment {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    gap: 0 16px;
    text-align: start;
  }
  .hb-site .hb-main .tkb-moment > .wp-block-group__inner-container {display: contents}
  .hb-site .hb-main .tkb-moment figure {grid-row: span 2}
  .hb-site .hb-main .tkb-moment h3 {align-self: end; margin: 0}
  .hb-site .hb-main .tkb-moment p {align-self: start}
  .hb-site .hb-main :is(.tkb-line, .tks-doc) {grid-template-columns: 1fr; gap: .3em}
  .hb-site .hb-main .tks-legal-row {grid-template-columns: auto minmax(0, 1fr); gap: .55em 1em}
  .hb-site .hb-main .tks-legal-row > :last-child {grid-column: 2; justify-self: start}
  .hb-site .hb-main :is(.tks-v6-nav, .hb-legacy-nav) {grid-template-columns: repeat(2, minmax(0, 1fr))}
}
@media print {
  .hb-site .hb-main :is(.tks-hero, .tkb-hero, .tks-page-intro, .tkb-section, .tkb-dark) {
    min-height: 0;
    padding: 12pt 0;
    color: black;
    background: white;
  }
  .hb-site .hb-main :is(.tks-hero, .tkb-hero)::before,
  .hb-site .hb-main :is(.tks-hero, .tkb-hero)::after,
  .hb-site .hb-main :is(.tks-hero, .tks-hero > .wp-block-group__inner-container) > :is(figure, .wp-block-image),
  .hb-site .hb-main .tkb-hero :is(.wp-block-cover__image-background, .wp-block-cover__background) {display: none}
  .hb-site .hb-main :is(.tks-hero .tks-copy, .tkb-hero .wp-block-cover__inner-container, .tks-hero h1, .tkb-hero h1) {color: black; text-shadow: none}
  .hb-site .hb-main :is(.tks-step, .tks-doc, .tks-legal-row) {break-inside: avoid}
}
