html {
  scroll-padding-top: 130px;
}

button {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
}

nav {
  ol, li {
    margin: 0;
    padding: 0;
    list-style: none;
  }
}


.l-page_sidemenu {
  display: none;
}

.l-page_body {
  max-width: 1024px;
  margin: 0 auto;
}

@media (min-width:1024px){
  .l-page_body {
    display:grid;
    grid-template-columns: 272px minmax(0,1fr);
    gap: 3em;
    align-items:start;
  }

  .l-page_sidemenu{
    display:block;
    align-self:start;
    position:sticky;
    top:120px;
  }
}

.l-section {
  max-width: 1320px;
  margin: auto;
  margin-bottom: 5em;
  padding: 0 .5rem;
}

@media (min-width:1024px){
  .l-section {
    margin-top: 5em;
  }
}

.c-page_nav_nested {
  padding-left: 2em;
}

.c-page_nav_button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.33em;
  padding: 0.5em 1em;
  opacity: 0.5;


  .num {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 1.5rem;
    paint-order: stroke;

    &:before {
      content: "";
      display: block;
      position: absolute;
      inset: 0;
      z-index: -1;
      left: 0.25em;
      width: 1.5rem;
      height: 1.5rem;
      border-radius: 50%;
      background-color: transparent;
    }
  }
  .num_option {
    font-size: 0.6em;
  }

  &.is_active {
    width: 100%;
    color: var(--color-theme-main);
    font-weight: bold;
    opacity: 1;

    .num {
      color: var(--color-theme-bg-main);
      -webkit-text-stroke: 3px var(--color-theme-main);

      &:before {
        background-color: var(--color-theme-main);
      }

    }

    &:after {
      content: "";
      display: block;
      flex: 1;
      height: 0.33em;
      background-image: url(../assets/images/help/triangle_r.svg);
      background-repeat: repeat-x;
      background-size: contain;
    }
  }
}

.c-tabs_nav{
  margin-bottom:16px;
  display: flex;
}

.c-tabs_btn{
  flex: 1;
  padding: 0.5em 1em;
  border-bottom: 3px solid var(--color-theme-main);
  border-radius: 1em 1em 0 0;
  color: var(--color-theme-main);

  &.is_active {
    background:var(--color-theme-main);
    color:var(--color-theme-bg-main);
  }
}

.c-tabs_panels {
  display:grid;
  gap: 3em;
}

.c-tabs_panel{
  grid-area:1/1;

  &.is_active {
    visibility: visible;
  }
}

.js {
  .c-tabs_panel:not(.is_active) {
    visibility: hidden;
  }
}

@media (min-width:1024px){
  .c-tabs_nav {
    display: none;
  }
  .c-tabs_panel {
    visibility: visible !important;

    &:nth-of-type(1) {
      grid-row: 1/2;
      grid-column: 1/2;
    }
    &:nth-of-type(2) {
      grid-row: 2/3;
      grid-column: 1/2;
    }
  }
}

.c-title-sub {
  display: flex;
  align-items: center;
  gap: 0.33em;
  margin-bottom: .6em;
  color: var(--bs-primary);
  font-weight: bold;
  font-size: 0.86em;
  text-align: center;
  line-height: 1.2;

  &:before {
    content: "";
    display: inline-block;
    width: .8em;
    height: .8em;
    border-radius: 0.5em;
    background-color: var(--bs-primary);
  }
}

.c-notice {
  padding: 1em 0.6em;
  background: #efefef;
  font-size: 0.9rem;

  .c-notice_title {
    display: inline-block;
    margin-bottom: 0.5em;
    padding: 0.2em 0.6em;
    background-color: #878787;
    color: var(--bs-body-bg);
    font-weight: bold;
  }
}

.c-anotaion {
  padding: 1em;
  border: 3px dotted var(--color-theme-main);
  border-radius: 1em;
}

.p-floppy {
  display: grid;
  grid-template-columns: 4fr 6fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: 
    "title title"
    "image text";
  align-items: center;
  gap: 1em;

  .p-floppy_title {
    grid-area: title;

    .title_text {
      display: inline-block;
      padding: 0.3em 0.6em;
      background-color: var(--color-theme-main);
      color: var(--bs-body-bg);
      font-weight: bold;
      line-height: 1.3;
    }
  }

  .p-floppy_image {
    grid-area: image;
  }
  .p-floppy_text {
    grid-area: text;
  }
}
@media (min-width: 768px) {
  .p-floppy {
    grid-template-columns: 3fr 7fr;
    grid-template-areas: 
      "image title"
      "image text";    
  }
}

.p-connector {
  position: relative;

  > *:not(:first-child) {
    margin-top: 1em;
  }
}

.p-connector_header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  .c-notice_title_sub {
    position: absolute;
    z-index: 1;
    height: 1.6em;
    top: -0.6em;
    right: 0;
    color: #878787;
  }

  svg {
    height: inherit;
  }

  .c-notice_title {
    position: relative;
    z-index: 2;
  }
}

.p-connector_header_image {
  flex: 1;
  text-align: right;

  img {
    height: 3em;
  }
}

.p-connector_box {
  position: relative;
  display: flex;
  gap: 1em;
  margin-top: 2em;

  .title {
    position: absolute;
    display: inline-block;
    inset: -1em 25% auto 25%;
    width: 10em;
    padding: 0.1em 0.6em;
    border: 2px solid #878787;
    border-radius: 0.6em;
    background-color: var(--color-theme-bg-main);
    color: #878787;
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
  }

  .connector_list {
    flex: 1;
    padding: 2vw;
    padding-top: 1em;
    border-radius: 1em;
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 76%;
    paint-order: stroke;

    dt {
      visibility: hidden;
      width: 0;
      height: 0;
    }
    dd {
      margin: 0;
      padding: 0;
      font-weight: bold;
    }

    &.is_ok {
      --color: oklch(82% 0.06 273);
      background-color: var(--color);
      background-image: url(../assets/images/help/maru.svg);
      -webkit-text-stroke: 3px var(--color);
    }
    &.is_ng {
      --color: oklch(82% 0.06 19);
      background-color: var(--color);
      background-image: url(../assets/images/help/batsu.svg);
      -webkit-text-stroke: 3px var(--color);
    }
  }
}

.p-connector_footer {
  display: flex;
  align-items: center;
  margin-top: 0 !important;

  img {
    height: 1em;
  }

  .code {
    flex: 1;
    height: 3px;
    background-color: #646464;
  }
}

@media (min-width: 768px) {
  .p-connector {
    display: grid;
    grid-template-columns: 5fr 5fr;
    gap: 1em;
    grid-template-rows: auto auto auto;
  }

  .p-connector_header {
    grid-row: 1 / 2;
    grid-column: 1 / 2;

    img {
      display: none;
    }
  }

  .p-connector_text {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
  }

  .p-connector_box {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    align-self: flex-end;

    .connector_list {
      margin-bottom: 0;
      padding: 1em;
    }
  }

  .p-connector_footer {
    grid-row: 3 / 4;
    grid-column: 1 / 3;
  }


  .p-connector_text {
  }
}


.c-grid {
  display: grid;
  grid-gap: 1em;

  .p-section_header, .p-step_header {
    grid-area: header;
  }

  .p-section_text, .p-step_text {
    grid-area: text;
  }

  .p-step_image {
    grid-area: image;
  }

  .p-section_box, .p-step_box {
    grid-area: box;

    &.box_1 {
      grid-area: box1;
    }
    &.box_2 {
      grid-area: box2;
    }
  }

}
@media (min-width: 768px) {
  .grid-box {
    grid-gap: 4em 1em;
  }
}

.p-section {
  text-align: justify;
  text-justify: inter-ideograph;

  p:last-of-type {
    margin-bottom: 0;
  }
}
.p-section_header {
  display: flex;
  align-items: stretch;
  margin-bottom: 1em;

  * {
    vertical-align: text-bottom;
  }
  .num {
    --font-size: 72px;
    display: flex;
    align-items: center;
    justify-content: center;

    width: calc(var(--font-size) * 0.82);
    color: var(--bs-primary);
    font-size: var(--font-size);
    font-weight: bold;
    line-height: 1;

    &.option {
      writing-mode: vertical-rl;
      font-size: calc(var(--font-size) * 0.33);
    }
  }
  .title {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 0.3em 0.5em;
    background-color: var(--bs-primary);
    color: var(--bs-body-bg);
  }
}
.p-section_body {
}

.p-step {
  margin: 3em 0;
}
.p-step_header{
  font-size: 1rem;
  font-weight: bold;
  .num-box {
    display: inline-block;
    margin-bottom: .66em;
    padding: 0.2em 1em;
    color: var(--bs-body-bg);
    background-color: var(--bs-primary);
    border-radius: 1.1em;
    font-size: 0.9em;
  }
  .text {
    color: var(--bs-primary);
  }
}

.section_movie {
  &.c-grid {
    grid-template-columns: 6fr 8fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
      "header box"
      "text box";
    /* align-items: center; */
  }

  .p-section_header{
    font-size: 1.5rem;;
    align-items: center;
    color: var(--color-theme-main);
  }

  video {
    grid-area: video;
    width: 100%;
    max-height: 76vh;
  }
}

.section_register {
  .c-grid {
    grid-template-columns: 6fr 6fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
      "text text"
      "download image";
  }

  .c-body_text {
    grid-area: text;
  }
  .c-body_download {
    grid-area: download;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .c-body_image {
    grid-area: image;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .box-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
  }

  .c-title-sub {
    margin-bottom: 2em;
    &:after {
      content: "";
      display: inline-block;
      width: .8em;
      height: .8em;
      border-radius: 0.5em;
      background-color: var(--bs-primary);
    }
  }
}
@media (min-width: 768px) {
  .section_register {
    .p-section_body {
      grid-template-columns: 8fr 4fr;
      grid-template-areas: 
        "text image"
        "download image";
    }
    .body-download {
      justify-content: start;
    }
    .box-links {
      flex-direction: row;
      width: 100%;

      > * {
        flex: 1;
      }
    }
  }
}

.section_load {
  .p-step_image {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.step_1 {
  &.c-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas: 
      "header header"
      "image image"
      "text text"
      "box1 box1"
      "box2 box2";
  }
}
@media (min-width: 768px) {
  .step_1 {
    &.c-grid {
      grid-template-areas: 
        "header header"
        "image text"
        "box1 box1"
        "box2 box2";
    }
  }
}


.step_2_1 {
  &.c-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas: 
      "text image";
  }
}

.step_2_2 {
  &.c-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: 
      "text"
      "box";
  }
}

.step_2_3 {
  &.c-grid {
    grid-template-columns: 6fr 4fr;
    grid-template-rows: auto;
    grid-template-areas: 
      "text image";
  }
}

.step_3 {
  &.c-grid {
    grid-template-columns: 6fr 4fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
      "header image"
      "text image";
  }
}

@media (min-width: 768px) {
  .step_2_1, .step_2_3, .step_3 {
    &.c-grid {
      grid-template-columns: 7fr 3fr;
    }
  }
}

.p-osfile {
  margin-top: 1em;

  ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .filebrowse {
    --arrowSize: 12px;
    display: flex;
    align-items: flex-start;
    gap: calc(var(--arrowSize) * 2);
  }

  .step {
    position: relative;
    flex: 1;

    + .step {
      &::before {
        content: "";
        position: absolute;
        display: block;
        transform: translate(calc(var(--arrowSize) * -1.5), 100px);
        width: var(--arrowSize);
        height: var(--arrowSize);
        background-color: var(--color-theme-main);
        clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
      }
    }

    .text {
      margin-top: 1em;
      font-size: 14px;
      line-height: 1.4;
    }
  }

  .c-notice {
    margin: 1em 0;
  }
}
@media (min-width:1024px) {
  .p-osfile {
    .filebrowse {
      gap: calc(var(--arrowSize) * 3);
    }
    .step {
      + .step {
        &::before {
          transform: translate(calc(var(--arrowSize) * -1.5), 120px);
        }
      }
    }
  }
}

.marker_main {
  background: linear-gradient(transparent 40%, oklab(var(--color-theme-main-oklab) / 0.26) 40%);
  background-size: 100% 100%;
  background-repeat: repeat;
  display: inline;
}


.marker_attention {
  background: linear-gradient(transparent 40%, oklab(var(--color-theme-attention-oklab) / 0.26) 40%);
  background-size: 100% 100%;
  background-repeat: repeat;
  display: inline;
}
