/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/*******************
 * PORTAL PAGE LAYOUT *
 *******************/

/* =========================================
   DEFAULT PORTAL LAYOUT
   Desktop: sidebar 18%, gap 4%, main 78%
   Constrained to Blocksy's content width
   ========================================= */

.portal-home,
.portal-layout {
  display: grid !important;
  grid-template-columns: 18% 78%;
  column-gap: 4%;
  align-items: start;

  width: min(100%, var(--theme-normal-container-max-width));
  max-width: var(--theme-normal-container-max-width);
  margin-inline: auto;

  box-sizing: border-box;
}

.portal-home > .portal-sidebar,
.portal-home > .portal-main,
.portal-layout > .portal-sidebar,
.portal-layout > .portal-main {
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

/* =========================================
   MOBILE LAYOUT
   Sidebar becomes a floating button;
   main content fills the available width.
   ========================================= */

@media (max-width: 768px) {
  .portal-home,
  .portal-layout {
    display: block;
    width: 100%;
  }

  .portal-main {
    width: 100%;
    max-width: 100%;
  }

  /* The sidebar's existing floating-button
     implementation should remain in control
     of its mobile visibility and positioning. */
}


/***********
 * SIDEBAR *
 ***********/

/* ===== Sidebar categories ===== */

.portal-sidebar > .portal-sidebar__category {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  align-self: stretch;
  box-sizing: border-box;
}

/* WordPress flex layouts add gaps between categories; only add the missing top gap here. */
.portal-sidebar > .portal-sidebar__category:first-of-type {
  margin-block-start: var(--wp--style--block-gap, 1.5rem);
}

.portal-sidebar__title {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 6px;
  padding: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  color: #222;
}

.portal-sidebar__panel {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #f0f1f3;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0;
}

.portal-sidebar__panel ul {
  width: 100%;
  box-sizing: border-box;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-sidebar__panel li {
  margin: 0;
}

.portal-sidebar__panel li + li {
  margin-top: 7px;
}

.portal-sidebar__panel p {
  margin: 0;
}

.portal-sidebar__panel p + p {
  margin-top: 7px;
}

/* Sidebar list icon layout */

.portal-sidebar__panel ul.wp-block-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-sidebar__panel ul.wp-block-list > li {
  position: relative;
  list-style: none;
  padding: 4px 0 4px 23px;
  margin: 0;
  line-height: 1.5;
}

.portal-sidebar__panel ul.wp-block-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 14px;
  height: 14px;

  background-color: #e53935;

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Link spacing */

/*
.portal-sidebar__panel ul.wp-block-list > li > a {
  display: block;
  padding: 0;
  line-height: inherit;
}
*/

/* Individual icons: classes belong to the LI element */

.portal-sidebar__panel li.portal-icon--circle-play::before {
  -webkit-mask-image: url("assets/icons/circle-play.svg");
  mask-image: url("assets/icons/circle-play.svg");
}

.portal-sidebar__panel li.portal-icon--circle-question-mark::before {
  -webkit-mask-image: url("assets/icons/circle-question-mark.svg");
  mask-image: url("assets/icons/circle-question-mark.svg");
}

.portal-sidebar__panel li.portal-icon--download::before {
  -webkit-mask-image: url("assets/icons/download.svg");
  mask-image: url("assets/icons/download.svg");
}

.portal-sidebar__panel li.portal-icon--file::before {
  -webkit-mask-image: url("assets/icons/file.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--file-en::before {
  -webkit-mask-image: url("assets/icons/file-en.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--file-jp::before {
  -webkit-mask-image: url("assets/icons/file-jp.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--file-text::before {
  -webkit-mask-image: url("assets/icons/file-text.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--file-text-en::before {
  -webkit-mask-image: url("assets/icons/file-text-en.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--file-text-jp::before {
  -webkit-mask-image: url("assets/icons/file-text-jp.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--list-checks::before {
  -webkit-mask-image: url("assets/icons/list-checks.svg");
  mask-image: url("assets/icons/list-checks.svg");
}

.portal-sidebar__panel li.portal-icon--messages-square::before {
  -webkit-mask-image: url("assets/icons/messages-square.svg");
  mask-image: url("assets/icons/messages-square.svg");
}

.portal-sidebar__panel li.portal-icon--monitor-play::before {
  -webkit-mask-image: url("assets/icons/monitor-play.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--monitor-play-en::before {
  -webkit-mask-image: url("assets/icons/monitor-play-en.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--monitor-play-jp::before {
  -webkit-mask-image: url("assets/icons/monitor-play-jp.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--play::before {
  -webkit-mask-image: url("assets/icons/play.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--play-en::before {
  -webkit-mask-image: url("assets/icons/play-en.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--play-jp::before {
  -webkit-mask-image: url("assets/icons/play-jp.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.portal-sidebar__panel li.portal-icon--toolbox::before {
  -webkit-mask-image: url("assets/icons/toolbox.svg");
  mask-image: url("assets/icons/toolbox.svg");
}

/* ===== Toggle button: hidden on desktop ===== */

.portal-sidebar__toggle {
  display: none;
}

.portal-sidebar__backdrop {
  display: none;
}


/* ===== Mobile sidebar and main content ===== */

@media (max-width: 768px) {

  /* Let the main content use the full available width */
  .portal-home,
  .portal-layout {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    min-width: 0;
  }

  .portal-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-inline: 0;
  }

  /* Closed sidebar: fixed strip attached to the left edge */
  .portal-sidebar:not(.is-open) {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1001;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    width: 30px;
    min-width: 30px;
    height: 120px;

    overflow: visible;
    padding: 0;
    margin: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* Short screens: use a fixed top position */
  @media (max-width: 768px) and (max-height: 500px) {
    .portal-sidebar:not(.is-open) {
      top: 190px;
      transform: none;
    }
  }

  /* Narrow vertical menu handle */
  .portal-sidebar__toggle {
    display: flex;
    flex: 0 0 120px;
    align-items: flex-start;
    justify-content: center;

    position: relative;
    width: 30px;
    min-width: 30px;
    height: 120px;
    min-height: 120px;
    box-sizing: border-box;

    padding: 12px 6px;
    margin: 0;

    border: 1px solid #d9dce1;
    border-left: 0;
    border-radius: 0 10px 10px 0;

    background: #f0f1f3;
    color: #202b3a;
    box-shadow: 2px 2px 8px rgb(0 0 0 / 10%);

    cursor: pointer;
    font-size: 0;
    line-height: 1;
  }

  /* Hamburger icon */
  .portal-sidebar__toggle::before {
    content: "";
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 14px;

    background:
      linear-gradient(#d92f35, #d92f35) top / 16px 2px no-repeat,
      linear-gradient(#d92f35, #d92f35) center / 16px 2px no-repeat,
      linear-gradient(#d92f35, #d92f35) bottom / 16px 2px no-repeat;
  }

  /* Vertical Japanese label */
  .portal-sidebar__toggle::after {
    content: "メニュー";
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);

    writing-mode: vertical-rl;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 1px;
    white-space: nowrap;
    color: #202b3a;
  }

  /* Hide menu categories while closed */
  .portal-sidebar:not(.is-open) > .portal-sidebar__category,
  .portal-sidebar:not(.is-open) .portal-sidebar__title,
  .portal-sidebar:not(.is-open) .portal-sidebar__panel {
    display: none !important;
  }

  /* ===== Open mobile drawer ===== */

  .portal-sidebar.is-open {
    position: fixed;
    top: 12px;
    right: auto;
    bottom: 12px;
    left: 12px;
    z-index: 1001;

    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;

    width: min(300px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    min-width: 0;
    height: auto;
    min-height: 0;
    max-height: none;

    box-sizing: border-box;
    padding: 12px;

    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;

    scrollbar-width: thin;
    scrollbar-color: #7d8794 transparent;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgb(0 0 0 / 18%);
  }

  /* Keep menu items at their natural height */
  .portal-sidebar.is-open > .portal-sidebar__toggle {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 44px;

    padding: 12px;
    border: 1px solid #d9dce1;
    border-radius: 8px;
    box-shadow: none;

    font-size: 14px;
  }

  .portal-sidebar.is-open > .portal-sidebar__toggle::before {
    flex: 0 0 18px;
    width: 18px;
    height: 14px;
    background:
      linear-gradient(#d92f35, #d92f35) top / 18px 2px no-repeat,
      linear-gradient(#d92f35, #d92f35) center / 18px 2px no-repeat,
      linear-gradient(#d92f35, #d92f35) bottom / 18px 2px no-repeat;
  }

  .portal-sidebar.is-open > .portal-sidebar__toggle::after {
    content: "閉じる";
    display: inline;
    position: static;
    transform: none;

    writing-mode: horizontal-tb;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1.5;
  }

  .portal-sidebar.is-open > .portal-sidebar__category {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;

    width: 100%;
    min-width: 0;
    height: auto;
  }

  .portal-sidebar.is-open .portal-sidebar__title {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
  }

  .portal-sidebar.is-open .portal-sidebar__panel {
    display: block;
    flex: 0 0 auto;

    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Inset scrollbar track in Chromium, Safari and Edge */
  .portal-sidebar.is-open::-webkit-scrollbar {
    width: 10px;
  }

  .portal-sidebar.is-open::-webkit-scrollbar-track {
    margin-block: 12px;
    background: transparent;
    border-radius: 8px;
  }

  .portal-sidebar.is-open::-webkit-scrollbar-thumb {
    background: #7d8794;
    border: 2px solid #fff;
    border-radius: 8px;
  }

  /* Page backdrop */
  .portal-sidebar__backdrop.is-visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;

    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;

    background: rgb(20 27 36 / 42%);
  }

  body.portal-sidebar-open {
    overflow: hidden;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: no-preference) {
  @media (max-width: 768px) {
    .portal-sidebar.is-open {
      animation: portal-drawer-in 0.2s ease-out;
    }

    .portal-sidebar__backdrop.is-visible {
      animation: portal-backdrop-in 0.2s ease-out;
    }

    @keyframes portal-drawer-in {
      from {
        transform: translateX(-12px);
        opacity: 0.8;
      }

      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    @keyframes portal-backdrop-in {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }
  }
}

/****************
 * MAIN CONTENT *
 ****************/
 
 
/* =========================================
   CAROUSEL VIEWPORT
   ========================================= */

.portal-carousel {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.portal-carousel__viewport {
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;

  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.portal-carousel__viewport::-webkit-scrollbar {
  display: none;
}

/* =========================================
   TRACK
   All dimensions are relative to viewport
   width, not the total width of all slides.
   ========================================= */

.portal-carousel__track {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;

  width: max-content;
  min-width: 100%;
  gap: 1cqi;
  padding-inline: 3.1cqi;
  box-sizing: border-box;
}

/* =========================================
   SLIDES
   ========================================= */

/* All original slides and clones use the same dimensions */
.portal-carousel__slide {
  position: relative;
  flex: 0 0 93.8cqi;
  width: 93.8cqi;
  min-width: 0;

  aspect-ratio: 12 / 5;
  box-sizing: border-box;

  scroll-snap-align: center;
}

.portal-carousel__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portal-carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================
   MOUSE DRAGGING
   ========================================= */

.portal-carousel__viewport {
  cursor: grab;
}

.portal-carousel__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.portal-carousel__link:focus-visible {
  outline: 4px solid #e53935;
  outline-offset: -4px;
  z-index: 2;
}

.portal-carousel__caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 28px 20px 18px;
  color: #fff;
  background: linear-gradient(
    to bottom,
    transparent,
    rgb(0 0 0 / 82%)
  );
}

.portal-carousel__caption strong {
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.4;
  font-weight: 700;
}

.portal-carousel__caption > span {
  font-size: 14px;
  line-height: 1.6;
}

.portal-carousel__controls {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0;
}

.portal-carousel__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
}

.portal-carousel__dot {
  display: block;
  width: 11px;
  height: 11px;
  min-width: 11px;
  padding: 0;
  border: 2px solid #727b88;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.portal-carousel__dot[aria-current="true"] {
  width: 24px;
  border-color: #d92f35;
  border-radius: 8px;
  background: #d92f35;
}

.portal-carousel__dot:focus-visible,
.portal-carousel__pause:focus-visible {
  outline: 3px solid #d92f35;
  outline-offset: 3px;
}

.portal-carousel__pause {
  align-self: center;
  padding: 5px 12px;
  border: 1px solid #c8cdd4;
  border-radius: 6px;
  background: #fff;
  color: #202b3a;
  font-size: 12px;
  cursor: pointer;
}

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

/* Smaller screens */

@media (max-width: 768px) {
  .portal-carousel {
    margin-bottom: 18px;
  }

  .portal-carousel__slide {
    aspect-ratio: 12 / 5;
    border-radius: 10px;
  }

  .portal-carousel__link {
    min-height: 0;
    height: 100%;
  }

  .portal-carousel__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .portal-carousel__caption {
    padding: 24px 12px 12px;
    gap: 3px;
  }

  .portal-carousel__caption strong {
    font-size: 17px;
  }

  .portal-carousel__caption > span {
    font-size: 12px;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  .portal-carousel__viewport {
    scroll-behavior: auto;
  }

  .portal-carousel__link img {
    transition: none;
  }
}

/* ===== Carousel refinements ===== */

/* Keep native image dragging from interfering with mouse dragging */
.portal-carousel__link img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* The carousel itself clips nothing horizontally;
   its viewport handles the slide movement */
.portal-carousel {
  position: relative;
}

.portal-carousel__viewport {
  cursor: grab;
}

.portal-carousel__viewport.is-dragging {
  cursor: grabbing;
}

/* Leave room for the dots over the caption */
.portal-carousel__caption {
  padding-bottom: 46px;
}

/* Overlay controls near the bottom of the cards */
.portal-carousel__controls {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  pointer-events: none;
}

.portal-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  pointer-events: auto;
}

.portal-carousel__dot {
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  min-width: 11px;
  padding: 0;
  border: 2px solid #fff;
  background: rgb(32 43 58 / 65%);
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}

.portal-carousel__dot[aria-current="true"] {
  flex-basis: 24px;
  width: 24px;
  border-color: #fff;
  background: #e53935;
}

/* Keep dots comfortably tappable on smaller screens */
@media (max-width: 768px) {
  .portal-carousel__controls {
    bottom: 10px;
  }

  .portal-carousel__caption {
    padding-bottom: 42px;
  }
}

/* Ensure carousel cards and their captions receive clicks */
.portal-carousel__slide,
.portal-carousel__link {
  pointer-events: auto;
}

.portal-carousel__caption {
  pointer-events: none;
}

.portal-carousel__link img {
  pointer-events: none;
}

/* =========================================
   CONTENT BELOW THE CAROUSEL
   ========================================= */
   
.portal-main-content {
  width: 93.8%; /*93.5897%;*/
  max-width: none;
  min-width: 0;

  margin-inline: auto;
  box-sizing: border-box;
}

/* ======================================
   PORTAL CIRCULAR ICON NAVIGATION
   ====================================== */

.portal-icon-navigation {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 20px auto;
    text-align: center;
}

/* Individual icon and text link */
.portal-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #333333;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1.4;
}

/* Circular background */
.portal-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;
    min-width: 54px;

    border-radius: 50%;
    background-color: var(--circle-bg, #edf0f3);
    border: 2px solid var(--circle-border, transparent);

    box-sizing: border-box;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

/* SVG image */
.portal-icon-circle img {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
    margin: 0;
}

/* Text underneath */
.portal-icon-label {
    display: block;
    font-weight: 500;
    color: #333333;
}

/* Hover effect */
.portal-icon-item:hover .portal-icon-circle {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.portal-icon-item:hover .portal-icon-label {
    color: #e87524;
}

/* Keyboard accessibility */
.portal-icon-item:focus-visible {
    outline: 2px solid #e87524;
    outline-offset: 4px;
    border-radius: 5px;
}

/* Tablet */
@media (max-width: 768px) {
    .portal-icon-navigation {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px 10px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .portal-icon-navigation {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 6px;
    }

    .portal-icon-circle {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .portal-icon-circle img {
        width: 23px;
        height: 23px;
    }

    .portal-icon-item {
        font-size: 12px;
    }
}



/*//////////////*/
/* Main Content */
/*//////////////*/

/*
.story-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.story-card img {
  width: 100%;
	height: auto; /* Remove if you want to crop landscape images 
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* More cards in grid on wider screens 
@media (max-width: 900px) {
  .portal-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
  }

  .story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Fewer cards in grid on narrower screens 
@media (max-width: 760px) {
  .portal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .portal-sidebar {
    order: 2;
  }

  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
*/

/* Restore normal page scrolling for pages without a scroll presentation in landscape layouts. */
@media (orientation: landscape) {
  body:not(.has-scroll-presentation) {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
  }

  body:not(.has-scroll-presentation):not(.portal-sidebar-open) {
    overflow-x: hidden;
    overflow-y: auto !important;
  }

  body:not(.has-scroll-presentation) #main-container,
  body:not(.has-scroll-presentation) #main,
  body:not(.has-scroll-presentation) #main > .ct-container,
  body:not(.has-scroll-presentation) #main > .ct-container-full,
  body:not(.has-scroll-presentation) #main .ct-container > article,
  body:not(.has-scroll-presentation) #main .ct-container-full > article,
  body:not(.has-scroll-presentation) #main .entry-content {
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
  }
}

/*
:root {
  --portal-font-stack:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI",
    "Yu Gothic",
    Meiryo,
    "Noto Sans JP",
    "Noto Sans CJK JP",
    Arial,
    sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--portal-font-stack);
}
*/

/*
 * THIS WORKS! FALLBACK TO THIS IF PROBLEMS

:root {
  --portal-font-stack:
	メイリオ,
	Meiryo,
	"ヒラギノ角ゴ Pro W3",
	"Hiragino Kaku Gothic Pro",
	"平成角ゴシック",
	HeiseiKakuGothic,
	Osaka,
	"ＭＳ Ｐゴシック",
	"MS PGothic",
	Arial,
	sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--portal-font-stack);
}
⁥*/

html {
  --portal-font: Arial, sans-serif;
}

html:lang(en) {
  --portal-font:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

html:lang(ja) {
  --portal-font:
	メイリオ,
	Meiryo,
	"ヒラギノ角ゴ Pro W3",
	"Hiragino Kaku Gothic Pro",
	"平成角ゴシック",
	HeiseiKakuGothic,
	Osaka,
	"ＭＳ Ｐゴシック",
	"MS PGothic",
	Arial,
	sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--portal-font);
}

/* Use the active site language font stack for text inside inline SVGs. */
svg text {
  font-family: var(--portal-font);
}
