/* Responsive facility video, with native YouTube playback controls. */
.facility-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: #172d34;
}
.facility-video__scheduled {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  padding: 20px;
  text-align: center;
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 700;
}
.facility-video iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Production display fixes: floor map and mobile coworking gallery. */
.split-feature__media:has(img[alt*="フロアマップ"]) {
  aspect-ratio: auto;
  height: auto;
  overflow: visible;
}

.split-feature__media:has(img[alt*="フロアマップ"]) img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 640px) {
  .photo-gallery > figure:last-child {
    grid-column: 1 / -1;
  }
}

/* The wider hero artwork retains its full scene inside the fixed hero frame. */
.home-hero__image-wrap img[src$="tbis-flyer-style-hero-v2.webp"] {
  content: url("media/tbis-flyer-style-hero-v5.png");
  transform: none;
}

.home-hero__image-wrap::after {
  display: none;
}

@media (min-width: 901px) {
  .desktop-nav > a {
    align-items: center;
    text-align: center;
  }

  .home-hero__grid {
    grid-template-columns: 0.76fr 1.36fr;
    gap: 22px;
    min-height: 660px;
    padding-block: 36px 48px;
  }

  .home-hero__image-wrap {
    aspect-ratio: 1.28;
    width: 128%;
    margin-left: -6%;
  }

  .home-hero__image-wrap img[src$="tbis-flyer-style-hero-v2.webp"] {
    transform: translateX(-6%);
    transform-origin: center;
  }
}

/* Use the body text color and a discreet size for the contact telephone. */
.contact-method a[href="tel:0572253366"] {
  color: var(--ink);
  font-size: 16px;
  font-weight: 300;
}

/* The app renders form messages; never remove those nodes from outside React. */
.contact-form[data-contact-last-submit="success"] .form-message--error {
  display: none !important;
}

.contact-form button[type="submit"]:disabled {
  position: relative;
  cursor: wait;
  opacity: 0.7;
  pointer-events: none;
}

.contact-form[data-contact-submit-state]::after {
  content: attr(data-contact-submit-message);
  grid-column: 1 / -1;
  display: block;
  margin: 16px 0 0;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.contact-form[data-contact-submit-state="sending"]::after {
  color: #005860;
  background: #e8f4f4;
}

.contact-form[data-contact-submit-state="success"]::after {
  color: #176139;
  background: #dff1e6;
}

.contact-form[data-contact-submit-state="error"]::after {
  color: #982f0c;
  background: #ffebe2;
}

.contact-submit-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-form button[type="submit"]:disabled span {
  visibility: hidden;
}

.contact-form button[type="submit"]:disabled::after {
  content: "送信中…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* Site release identifier. Update this value for each published revision. */
.site-footer__bottom > p::after {
  content: "　Ver.1.9";
  color: #71858a;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .home-hero__image-wrap img[src$="tbis-flyer-style-hero-v2.webp"] {
    object-position: 80% center;
    transform: scale(1.16);
    transform-origin: right top;
  }
}

/* Strengthen the headings in the shared quick-action cards site-wide. */
.quick-card h3 {
  font-weight: 800;
}

/* Apply the same hierarchy to headings in every shared card component. */
.card h3 {
  font-weight: 800;
}

/* About: four-step support flow based on the facility flyer. */
.purpose-flow-section { background: #fff; padding-block: clamp(56px, 5vw, 72px); }
.purpose-flow { text-align: center; }
.purpose-flow__lead { margin: 0 0 16px; color: var(--ink); font-size: clamp(16px, 1.55vw, 22px); font-weight: 900; letter-spacing: .08em; }
.purpose-flow__headline { display: grid; grid-template-columns: auto minmax(360px, 1fr); align-items: center; gap: 7%; margin-bottom: 18px; text-align: left; }
.purpose-flow__headline span { width: fit-content; padding: 5px 10px; background: var(--yellow); color: var(--teal); font-size: clamp(17px, 1.8vw, 25px); font-weight: 900; }
.purpose-flow__headline strong { display: block; padding: 7px 20px; border-radius: 999px; background: var(--yellow); color: var(--ink); text-align: center; font-size: clamp(18px, 2vw, 28px); font-weight: 900; letter-spacing: .08em; }
.purpose-flow__steps { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.purpose-flow__step { min-width: 0; }
.purpose-flow__box { box-sizing: border-box; display: grid; align-content: start; height: 220px; padding: 24px 16px 15px; color: #fff; }
.purpose-flow__box h3 { margin: 0 0 18px; color: var(--yellow); font-size: clamp(19px, 2vw, 29px); line-height: 1.15; }
.purpose-flow__box p { margin: 0; color: #fff; font-size: clamp(12px, 1.2vw, 16px); font-weight: 700; line-height: 1.55; }
.purpose-flow__step--teal .purpose-flow__box { background: var(--teal); }
.purpose-flow__step--blue .purpose-flow__box { background: var(--blue); }
.purpose-flow__step--orange .purpose-flow__box { background: var(--orange); }
.purpose-flow__step--olive .purpose-flow__box { background: var(--olive); }
.purpose-flow__step > b { display: block; margin-top: 6px; color: var(--teal); font: 900 14px/1 Montserrat, sans-serif; letter-spacing: .08em; }
.purpose-flow__step--blue > b { color: var(--blue); }
.purpose-flow__step--orange > b { color: var(--orange); }
.purpose-flow__step--olive > b { color: var(--olive); }
.purpose-flow__arrow { color: var(--blue); font: 900 52px/1 Montserrat, sans-serif; }
.purpose-flow__arrow:nth-of-type(4) { color: var(--orange); }
.purpose-flow__partners { margin: 34px 0 10px; color: var(--ink); font-size: clamp(16px, 1.55vw, 22px); font-weight: 900; letter-spacing: .08em; }
.purpose-flow__partners-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border: 2px solid var(--teal); padding: 8px; }
.purpose-flow__partners-detail b { padding: 9px 6px; background: var(--teal); color: #fff; font-size: 13px; }

@media (max-width: 640px) {
  .purpose-flow-section { padding-block: 46px; }
  .purpose-flow__lead { text-align: left; font-size: 14px; line-height: 1.55; }
  .purpose-flow__headline { grid-template-columns: 1fr; gap: 8px; }
  .purpose-flow__headline strong { font-size: 17px; line-height: 1.35; }
  .purpose-flow__steps { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
  .purpose-flow__arrow { display: none; }
  .purpose-flow__box { height: 180px; padding: 18px 10px 12px; }
  .purpose-flow__box h3 { margin-bottom: 13px; font-size: 19px; }
  .purpose-flow__box p { font-size: 12px; }
  .purpose-flow__step > b { font-size: 10px; }
  .purpose-flow__partners { margin-top: 24px; font-size: 14px; line-height: 1.6; }
  .purpose-flow__partners-detail { grid-template-columns: 1fr; padding: 5px; }
}

/* Use a consistent extra-bold weight for third-level headings site-wide. */
h3 {
  font-weight: 800;
}

/* Facility-style privacy policy and the in-form policy viewer. */
.privacy-facility-page { background: #f5f3ea; }
.privacy-policy { padding-block: clamp(54px, 7vw, 110px); }
.privacy-policy__hero { position: relative; overflow: hidden; padding: clamp(30px, 5vw, 68px); border-top: 8px solid var(--teal); background: #fff; }
.privacy-policy__hero::after { position: absolute; right: -30px; bottom: -85px; width: 300px; height: 230px; background: var(--yellow); content: ''; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); opacity: .9; }
.privacy-policy__eyebrow { margin: 0 0 10px; color: var(--orange); font: 800 11px/1.3 Montserrat, sans-serif; letter-spacing: .16em; }
.privacy-policy__hero > span, .privacy-modal__panel > span { display: inline-block; padding: 7px 12px; background: var(--teal); color: #fff; font: 800 12px/1 Montserrat, sans-serif; letter-spacing: .14em; }
.privacy-policy__hero h1 { position: relative; z-index: 1; max-width: 800px; margin: 18px 0; color: var(--ink); font-size: clamp(34px, 5vw, 66px); line-height: 1.2; }
.privacy-policy__hero h1 em { color: var(--teal); font-style: normal; }
.privacy-policy__hero > p:last-child { position: relative; z-index: 1; max-width: 670px; margin: 0; color: var(--ink); font-size: 16px; line-height: 2; }
.privacy-policy__layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(30px, 6vw, 84px); margin-top: clamp(34px, 5vw, 68px); }
.privacy-policy__nav { align-self: start; position: sticky; top: 30px; border-top: 4px solid var(--teal); }
.privacy-policy__nav a { display: block; padding: 17px 4px; border-bottom: 1px solid #c9d7d6; color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.privacy-policy__nav a:hover { color: var(--orange); }
.privacy-policy__content { display: grid; gap: 18px; }
.privacy-policy__item { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 18px; padding: clamp(22px, 3vw, 38px); border-top: 5px solid var(--teal); background: #fff; }
.privacy-policy__item > span { color: var(--orange); font: 900 clamp(28px, 3vw, 42px)/1 Montserrat, sans-serif; }
.privacy-policy__item h2 { margin: 0 0 13px; color: var(--ink); font-size: clamp(20px, 2vw, 27px); }
.privacy-policy__item p { margin: 0; color: #38505a; font-size: 15px; line-height: 2; }
.privacy-policy__item .privacy-policy__contact { margin-top: 14px; padding-top: 14px; border-top: 1px solid #d9e2df; }
.privacy-policy__contact a { color: var(--teal); font-weight: 900; }
.privacy-modal { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 20px; }
.privacy-modal[hidden] { display: none; }
.privacy-modal__backdrop { position: absolute; inset: 0; background: rgb(10 35 42 / .62); }
.privacy-modal__panel { position: relative; z-index: 1; width: min(760px, 100%); max-height: min(800px, calc(100vh - 40px)); overflow: auto; padding: clamp(28px, 5vw, 52px); border-top: 8px solid var(--teal); background: #f7f5ec; box-shadow: 0 18px 60px rgb(0 0 0 / .28); }
.privacy-modal__panel h2 { margin: 18px 0 28px; color: var(--ink); font-size: clamp(29px, 4vw, 43px); }
.privacy-modal__close { position: absolute; top: 10px; right: 12px; width: 42px; height: 42px; border: 0; background: var(--orange); color: #fff; cursor: pointer; font-size: 30px; line-height: 1; }
.privacy-modal .privacy-policy__item { padding: 21px; }

/* Keep the consent-policy link tappable inside the mobile form label. */
.form-consent a[href$="/privacy"] { position: relative; z-index: 2; display: inline-block; pointer-events: auto; touch-action: manipulation; }

/* Decorative shapes and image labels must not create a horizontal scroll area on phones. */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-frame,
  #root {
    max-width: 100%;
  }

  main {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  main .shell,
  main .narrow,
  main [class$="__grid"] {
    min-width: 0;
  }
}

@supports (overflow: clip) {
  @media (max-width: 900px) {
    html,
    body {
      overflow-x: clip;
    }

    main {
      overflow-x: clip;
    }
  }
}

@media (max-width: 640px) {
  /* Stack the TOP pitch and grant cards so their artwork cannot sit behind the copy. */
  .pitch-grant-grid article {
    display: block;
  }

  .pitch-grant-grid article > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    min-height: 0;
    object-fit: cover;
  }

  .pitch-grant-grid article > div {
    position: relative;
    z-index: 1;
    background: #fff;
  }

  .privacy-policy { padding-block: 42px; }
  .privacy-policy__hero { padding: 28px 22px 46px; }
  .privacy-policy__hero::after { right: -88px; bottom: -115px; }
  .privacy-policy__hero > p:last-child { font-size: 14px; line-height: 1.85; }
  .privacy-policy__layout { grid-template-columns: 1fr; gap: 24px; margin-top: 30px; }
  .privacy-policy__nav { position: static; display: grid; grid-template-columns: 1fr 1fr; border-top-width: 3px; }
  .privacy-policy__nav a { padding: 12px 6px; font-size: 11px; }
  .privacy-policy__item { grid-template-columns: 43px minmax(0, 1fr); gap: 10px; padding: 22px 18px; }
  .privacy-policy__item p { font-size: 13px; line-height: 1.8; }
  .privacy-modal { padding: 10px; }
  .privacy-modal__panel { max-height: calc(100vh - 20px); padding: 35px 18px 24px; }
  .privacy-modal .privacy-policy__item { padding: 17px 12px; }
}

/* Keep the illustration-led pitch and grant cards legible at desktop widths. */
@media (min-width: 901px) {
  .pitch-grant-grid article > img {
    align-self: stretch;
    box-sizing: border-box;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    padding: 12px 0 12px 12px;
  }
}

