.mako-brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #2b2b2b;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.mako-brand-name {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.mako-brand-subtitle {
  margin-top: 8px;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.header_fixed .mako-brand-name {
  font-size: 20px;
}

.header_fixed .mako-brand-subtitle {
  margin-top: 5px;
  font-size: 7px;
}

.footer_logo .mako-brand-name {
  font-size: 34px;
}

.footer_logo .mako-brand-subtitle {
  font-size: 10px;
}

.mv .mv_button a::after {
  background-image: var(--cms-hero-cat-image, url("/__custom/quantum-cat-hero.webp"));
}

/* Saturn-ring motif for the large hero CTA. The opaque planet hides the
   middle of each ellipse, leaving clean rings without crossing the label. */
.mv .mv_button {
  isolation: isolate;
}

.mv .mv_button::before,
.mv .mv_button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 154px;
  height: 42px;
  border: 2px solid rgba(224, 247, 252, 0.98);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(18, 51, 67, 0.7);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-14deg);
}

.mv .mv_button::after {
  width: 166px;
  height: 50px;
  border-width: 2px;
  border-color: rgba(18, 51, 67, 0.84);
  box-shadow: none;
}

.mv .mv_button a {
  z-index: 1;
}

#js-loading.is-first::before {
  background-image: var(--cms-hero-cat-image, url("/__custom/quantum-cat-hero.webp"));
}

.top_nostimes .video-lightbox-trigger .img {
  position: relative;
}

.top_nostimes .video-lightbox-trigger .img::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 72px;
  height: 23px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(18, 51, 67, 0.42);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-14deg);
}

.top_nostimes .video-lightbox-trigger .img::before {
  content: "▶";
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding-left: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  transition: background-color 180ms ease-out;
}

.top_nostimes .video-lightbox-trigger:hover .img::before,
.top_nostimes .video-lightbox-trigger:focus-visible .img::before {
  background: rgba(0, 0, 0, 0.9);
}

.top_nostimes .video-lightbox-trigger:hover .img img {
  transform: scale(1.001);
}

.video-lightbox {
  width: min(92vw, 1080px);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
}

.video-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.84);
}

.video-lightbox__frame {
  aspect-ratio: 16 / 9;
}

.video-lightbox__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-lightbox__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111;
  font: 400 30px/1 Arial, sans-serif;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.video-lightbox__close:focus-visible {
  outline: 3px solid #3188a3;
  outline-offset: 3px;
}

@media screen and (max-width: 767px) {
  /* Keep the vertical hero message present without letting its white frame
     dominate the photograph on phone screens. Desktop keeps the source size. */
  .mv .mv_txt {
    width: 56px;
    height: 192px;
  }

  .mv .mv_txt picture,
  .mv .mv_txt img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mv .mv_button {
    right: 28px;
  }

  .mv .mv_button::before {
    width: 146px;
    height: 38px;
  }

  .mv .mv_button::after {
    width: 154px;
    height: 44px;
  }

  .top_nostimes .video-lightbox-trigger .img::after {
    width: 54px;
    height: 18px;
  }

  .top_nostimes .video-lightbox-trigger .img::before {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .video-lightbox {
    width: calc(100vw - 24px);
  }

  .video-lightbox__close {
    width: 38px;
    height: 38px;
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top_nostimes .video-lightbox-trigger .img::before {
    transition: none;
  }
}

/* Official channel banner: real event photograph, preserved panoramic layout. */
.section_pj {
  background-image:
    linear-gradient(rgba(8, 25, 38, 0.56), rgba(8, 25, 38, 0.56)),
    var(--cms-channels-desktop-image, url("/__custom/official-channels-desktop.avif"));
  background-position: center;
  background-size: cover;
  overflow-x: clip;
  overflow-y: visible;
}

.section_pj.soon::before {
  content: none;
  display: none;
}

.section_pj-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: auto;
  height: auto;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 25, 38, 0.52);
  box-shadow: 0 8px 24px rgba(3, 15, 24, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  white-space: nowrap;
  position: absolute;
  top: 18px;
  left: max(20px, calc(50% - 470px));
  z-index: 2;
}

.section_pj-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #53c7e5;
  box-shadow: 0 0 0 4px rgba(83, 199, 229, 0.16);
}

.section_pj .ttl_pj {
  max-width: 92%;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(2rem, 4.45vw, 4rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-wrap: balance;
  text-shadow: 0 2px 8px rgba(3, 15, 24, 0.52);
  position: relative;
  z-index: 2;
}

/* The original telephone treatment made the LINE CTA oversized and misleading. */
.footer_button .line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #303030;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.94em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.footer_button .line::before {
  content: "LINE";
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  color: #fff;
  background: #06c755;
  font-family: Arial, sans-serif;
  font-size: 0.48rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.footer_button:focus-visible {
  outline: 3px solid #3189a7;
  outline-offset: 3px;
}

@media screen and (max-width: 767px) {
  .footer_button .line {
    gap: 8px;
    font-size: 0.9em;
  }

  .footer_button .line::before {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 0.42rem;
  }
}

@media screen and (max-width: 767px) {
  .section_pj {
    min-height: 160px;
    aspect-ratio: auto;
    background-image:
      linear-gradient(rgba(8, 25, 38, 0.58), rgba(8, 25, 38, 0.58)),
      var(--cms-channels-mobile-image, url("/__custom/official-channels-mobile.avif"));
  }

  .section_pj-badge {
    gap: 7px;
    padding: 8px 12px;
    font-size: 0.67rem;
    top: 12px;
    left: 12px;
  }

  .section_pj .ttl_pj {
    max-width: 88%;
    font-size: clamp(1.35rem, 6vw, 1.8rem);
    letter-spacing: 0.06em;
    transform: translateY(-10px);
  }
}

.top_about .shirokuma .img img {
  animation: quantum-cat-brew 3.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}

.top_kurashi .sofa-kuma {
  animation: quantum-cat-read 4s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.section_pj .taiya {
  display: none;
}

.section_pj .shirokuma_pj {
  right: 0;
  left: auto;
  will-change: transform;
}

.section_pj.animated .shirokuma_pj {
  animation: mako-rocket-route 13s linear infinite;
}

.section_pj.animated .shirokuma_pj > img:first-child {
  animation: quantum-cat-flight 0.9s ease-in-out infinite;
}

@media screen and (max-width: 767px) {
  .section_pj .shirokuma_pj {
    z-index: 1;
  }

  .section_pj.animated .shirokuma_pj {
    animation: mako-rocket-route-mobile 8s linear infinite;
  }
}

/* Ten seconds of flight followed by a three-second off-screen pause. */
@keyframes mako-rocket-route {
  0% { transform: translate3d(100%, 0, 0); }
  76.9231%, 100% { transform: translate3d(calc(-100vw - 100%), 0, 0); }
}

/* Preserve the original five-second phone crossing, then pause three seconds. */
@keyframes mako-rocket-route-mobile {
  0% { transform: translate3d(100%, 0, 0); }
  62.5%, 100% { transform: translate3d(calc(-100vw - 100%), 0, 0); }
}

@keyframes quantum-cat-brew {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-0.6deg); }
}

@keyframes quantum-cat-read {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(1px) scale(1.005); }
}

@keyframes quantum-cat-flight {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-2px) rotate(0.4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .top_about .shirokuma .img img,
  .top_kurashi .sofa-kuma,
  .section_pj.animated .shirokuma_pj,
  .section_pj.animated .shirokuma_pj > img:first-child {
    animation: none;
  }
}

.header_logo {
  width: 240px;
}

.header_fixed .logo {
  width: 150px;
}

.footer_logo {
  width: 70%;
  max-width: 320px;
}

@media screen and (max-width: 767px) {
  .header_logo {
    width: 145px;
    padding: 4px 8px 6px;
  }

  .header_logo .mako-brand-name {
    font-size: 22px;
    letter-spacing: 0.025em;
  }

  .header_logo .mako-brand-subtitle {
    margin-top: 6px;
    font-size: 8px;
    letter-spacing: 0.05em;
  }

  .footer_logo {
    width: 68%;
  }

  .footer_logo .mako-brand-name {
    font-size: 28px;
  }
}

/* Tablet layout: the source theme only defines desktop and phone states and
   otherwise keeps a 1200px canvas. Keep the desktop composition from 1200px
   upward, while letting every public page use the viewport between those
   states. This is intentionally an override in the custom layer. */
@media screen and (min-width: 768px) and (max-width: 1199px) {
  html,
  body {
    min-width: 0;
  }

  #container_wrap,
  #container,
  #content {
    width: 100%;
    min-width: 0;
  }

  #container_wrap {
    overflow: visible;
  }

  .header_box,
  .low,
  .load,
  .header_fixed {
    width: 100%;
    min-width: 0;
  }

  .header_fixed {
    padding-right: 24px;
  }

  .inner,
  .ttl_low,
  .mv {
    width: min(92%, 1120px);
  }

  .inner_right {
    margin-left: 4%;
  }

  /* All custom page shells share the same safe gutter at tablet widths. */
  .mako-profile-intro,
  .mako-profile-history,
  .mako-profile-themes,
  .mako-profile-books,
  .mako-profile-cta,
  .mako-quantum-intro,
  .mako-quantum-features,
  .mako-quantum-site,
  .mako-quantum-sources,
  .mako-quantum-related,
  .mako-cat-intro,
  .mako-cat-experiment,
  .mako-cat-question,
  .mako-cat-metaphor,
  .mako-cat-book,
  .mako-cat-sources,
  .mako-cat-related,
  .mako-knowledge-section-heading,
  .mako-knowledge-domain-list,
  .mako-knowledge-question,
  .mako-knowledge-practice,
  .mako-knowledge-sources,
  .mako-knowledge-related,
  .mako-learning-index,
  .mako-learning-question,
  .mako-thought-influence,
  .mako-thought-emotion,
  .mako-thought-practice,
  .mako-thought-boundary,
  .mako-thought-related,
  .mako-topic-intro,
  .mako-topic-position,
  .mako-topic-sequence,
  .mako-topic-contrast,
  .mako-topic-control,
  .mako-topic-start,
  .mako-topic-sources,
  .mako-topic-related,
  .mako-launch-intro,
  .mako-books-list,
  .mako-media-channels,
  .mako-news-list,
  .mako-faq-layout,
  .mako-faq-sources,
  .mako-launch-cta,
  .mako-not-found-layout {
    width: min(calc(100% - 48px), 1120px);
  }

  /* Narrow two-column compositions to their available tracks. The source
     min-width tracks are what cause clipping before the phone breakpoint. */
  .mako-profile-intro,
  .mako-profile-section-heading,
  .mako-profile-books,
  .mako-quantum-definition,
  .mako-quantum-features > header,
  .mako-quantum-observation,
  .mako-quantum-site,
  .mako-quantum-sources,
  .mako-cat-intro-layout,
  .mako-cat-experiment > header,
  .mako-cat-box,
  .mako-cat-metaphor,
  .mako-cat-book,
  .mako-cat-sources,
  .mako-knowledge-section-heading,
  .mako-knowledge-question,
  .mako-knowledge-practice > header,
  .mako-knowledge-sources,
  .mako-thought-influence-heading,
  .mako-thought-influence-copy,
  .mako-thought-emotion,
  .mako-thought-practice > header,
  .mako-thought-practice-layout,
  .mako-thought-boundary,
  .mako-topic-intro-layout,
  .mako-topic-position,
  .mako-topic-sequence > header,
  .mako-topic-contrast > header,
  .mako-topic-control > header,
  .mako-topic-sources,
  .mako-launch-intro,
  .mako-books-row,
  .mako-faq-layout,
  .mako-faq-sources {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: clamp(28px, 5vw, 64px);
  }

  .mako-profile-history-layout,
  .mako-quantum-site,
  .mako-knowledge-question,
  .mako-thought-practice-layout {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.38fr) !important;
  }

  .mako-learning-intro,
  .mako-learning-feature,
  .mako-learning-index > header,
  .mako-learning-question {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: clamp(24px, 4vw, 56px);
  }

  .mako-media-video-list,
  .mako-news-row.is-featured {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .mako-media-channels a,
  .mako-news-row {
    grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr) 34px !important;
  }

  .mako-faq-list summary {
    grid-template-columns: 46px minmax(0, 1fr) 30px !important;
  }

  .mako-cat-box li {
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr) !important;
    gap: clamp(18px, 3vw, 34px);
  }

  .mako-cat-box strong {
    width: auto;
    min-width: 0;
  }

  /* The homepage slider inherits a fixed-width Swiper track from the source
     theme. Reset its flex items so the track cannot enlarge the document. */
  .top_about,
  .top_nostimes,
  .top_kurashi,
  .top_works,
  .top_works .right,
  .top_works .slide_works,
  .top_works .swiper,
  .top_works .swiper-wrapper {
    min-width: 0;
    max-width: 100%;
  }

  .top_about .desc,
  .top_about .catch,
  .top_about .shirokuma {
    min-width: 0;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }
}
/* Book browsing: reserve the navigation row below the smaller covers. */
.top_works .slide_works_box { padding-right: 0; }
.top_works .slide_works { margin-bottom: 64px; }
.top_works .works-button-prev.swiper-button-disabled,
.top_works .works-button-next.swiper-button-disabled { opacity: .35; }
