@charset "utf-8";

/* ゆとシートⅡ */

@import url('https://fonts.googleapis.com/css2?family=Varela+Round&text=0123456789%25%23%40-%2B%3D');
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500;700&text=ABCČĆDĐEFGHIJKLMNOPQRSŠTUVWXYZŽabcčćdđefghijklmnopqrsštuvwxyzž%26%20');
@import url('https://fonts.googleapis.com/css2?family=Kosugi&text=%E2%80%9C%E2%80%9D');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300..700,0..1,-25');

@font-face { font-family: "Arial"; src: local("Arial"); unicode-range: U+0020-0039,U+003F-007F; }

main::before {
  content: "ブラウザをアップデートしてください。\A必須: Chrome 112～／FireFox 98～／Safari 16.5～\A推奨: Chrome 最新版／FireFox 最新版／Safari 最新版";
  white-space: pre;
  background-color: #fca;
  color: #000;

  display: block;
  max-width: 900px;
  margin: 2em 1em;
  padding: .5em;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;

  position: absolute;
  inset: 5em 0 auto;
  z-index: 1000;
}
main {
  margin-top: 10em;
  &::before {
    display: none;
  }
  & {
    margin-top: 0;
  }
}
@layer base {

/* // Font
---------------------------------------------------------------------------------------------------- */
:root {
  --base-font-family-jp : "BIZ UDGothic", "Hiragino Sans","Kosugi","Meiryo",sans-serif;
  --base-font-family-pr : "BIZ UDPGothic","Hiragino Sans","Meiryo UI",sans-serif;
  --base-font-family-min: "Noto Serif JP","YuMincho","ヒラギノ明朝 ProN W3","Hiragino Mincho ProN",serif;
  --base-font-family-input: 'Arial',"BIZ UDPGothic","Hiragino Sans","Meiryo UI",sans-serif;
  --base-font-family-mono : "BIZ UDGothic", monospace;
}

body {
  font-family: "Varela Round","Raleway",var(--base-font-family-jp);
  --font-proportional: "Varela Round","Raleway",var(--base-font-family-pr);
}
header nav,
main nav {
  font-family: "ヒラギノ角ゴ ProN","Hiragino Kaku Gothic ProN","HiraKakuProN-W3","Meiryo",sans-serif;
}
input, select {
  font-family: var(--base-font-family-input);
  accent-color: var(--accent-color);
}
textarea,tt {
  font-family: var(--base-font-family-mono);
  font-size: inherit;
}

.left   { text-align: left !important; }
.center { text-align: center !important; }
.right  { text-align: right !important; }
ruby {
  position: relative;
}
ruby rt {
  font-family: Arial,var(--base-font-family-jp);
  transform: translateY(0.2em);
}
ruby rp {
  display: inline flow-root;
  font-size: 0;
}
.bold {
  font-weight: bold;
}
.oblique {
  font-style: oblique;
}
.strike {
  text-decoration: line-through;
}
.underline {
  text-decoration: 2px underline rgba(255,100,0,0.5);
  text-underline-offset: .2rem;
}
.text-em {
  -webkit-text-emphasis: dot filled;
  text-emphasis: dot filled;
}
.transparent {
  color: transparent;
  text-shadow: none;
}
.d-dash {
  display: inline-block;
  font-family: "Meiryo","小塚明朝 Pro","Kozuka Mincho Pro","Kozuka Mincho Std",sans-serif;
  transform: scaleX(0.90);
}
.d-dash > span {
  display: inline-block;
  transform: scaleX(1.2);
}
.small {
  font-size: 85%;
}
.very-small {
  font-size: 75%;
}
.material-symbols-outlined {
  font-size: inherit !important;
  vertical-align: text-bottom;
}
.nowrap {
  white-space: nowrap;
}

/* アイテムアイコン */
.i-icon {
  width: 1em;
  height: 1em;
  vertical-align: -1px;
}

/* アイコン */
.s-icon {
  display: inline-block;
  position: relative;
  width: 1em;
  height: 1em;
  text-align: center;
  font-style: normal;
  line-height: 1;
  vertical-align: text-bottom;

  > .raw {
    display: block;
    position: absolute;
    transform: scaleX(0.5) translateX(-1em);
    text-wrap: nowrap;
    color: transparent;
    text-shadow: none;
  }

  &::before,
  &::after {
    display: grid;
    position: absolute;
    inset: -0.2em 0 0;
    justify-items: center;
    align-items: center;
    font-family: "Material Symbols Outlined";
    font-weight: bold;
    pointer-events: none;
  }

  &:not(:has(.raw)) {
    color: transparent;
    &::before, &::after {
      color: var(--text-color);
    }
  }

  /* コピーライト */
  &.copyright::before {
    content: "\e90c";
    font-weight: normal;
    transform: scale(1.2) translateX(-1px);
  }
}

/* // Base
---------------------------------------------------------------------------------------------------- */
:root {
  --text-color: #000000;
  --bg-color: #ffffff;
  --section-bg-color: #ffffff80;
  --border-color: #999;
  --input-bg-color: rgba(255,255,255,0.7);

  --theme-main-hue  : 255;
  --theme-sub-hue   : 270;
  --theme-accent-hue: 270;
  --theme-menu-hue: var(--theme-sub-hue);
  --header-chroma: 0.06;
  --header-lightness: 71%;
  --header-color: oklch(var(--header-lightness) var(--header-chroma) var(--theme-main-hue));
  --h2-color    : oklch(88% 0.05 var(--theme-sub-hue));
  --h3-color    : oklch(92% 0.04 var(--theme-sub-hue));
  --h4-color    : oklch(97% 0.02 var(--theme-sub-hue));
  --row-bg-hover: oklch(70% 0.28 var(--theme-accent-hue) / 0.2);
  --menu-icon-color        : oklch(35% 0.04 var(--theme-menu-hue));
  --menu-icon-bg-color     : oklch(80% 0.04 var(--theme-menu-hue));
  --menu-icon-current-color: oklch(60% 0.1 var(--theme-accent-hue));
  --menu-icon-current-bg-color: #fff;
  --icon--color        : oklch(60% 0.04 var(--theme-sub-hue));
  --icon--current-color: oklch(80% 0.1 var(--theme-accent-hue));
  --a-link-color   : var(--text-color);
  --a-visited-color: #555;
  --a-line-color   : oklch(80% 0.11 var(--theme-accent-hue));
  --a-hover-color  : oklch(62% 0.25 var(--theme-accent-hue));
  --accent-color   : oklch(57% 0.3 var(--theme-accent-hue));
}
@media screen {
  .night {
    --text-color: #ffffff;
    --bg-color: #0f0f0f;
    --section-bg-color: #26262680;
    --border-color: #556;
    --input-bg-color: rgba(0,0,0,0.8);
  
    --header-lightness: 45%;
    --h2-color: oklch(40% 0.05 var(--theme-sub-hue));
    --h3-color: oklch(35% 0.04 var(--theme-sub-hue));
    --h4-color: oklch(30% 0.02 var(--theme-sub-hue));
    --menu-icon-color   : oklch(98% 0.04 var(--theme-menu-hue));
    --menu-icon-bg-color: oklch(45% 0.04 var(--theme-menu-hue));
    --icon--current-color: oklch(85% 0.1 var(--theme-accent-hue));
    --a-visited-color: #ccc;
    --a-line-color   : oklch(45% 0.16 var(--theme-accent-hue));
    --accent-color   : oklch(80% 0.23 var(--theme-accent-hue));
  }
}
*, *::before, *::after {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  height: 100vh;
}

body {
  font-size  : 1.4rem;
  line-height: 1.5;
  line-break: strict;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-print-color-adjust: exact;
  text-spacing-trim: space-all;
}

hr {
  border-width: 1px 0 0;
  border-style: solid;

  &.dotted { border-style: dotted; }
  &.dashed { border-style: dashed; }
}

table, tr, th, td {
  border-width: 0;
  border-collapse: collapse;
}
td {
  empty-cells: show;
}

dt {
  font-weight: bold;
}

ul,ol {
  list-style-type: none;
  &.disc    { padding-left: 2em; list-style-type: disc !important; }
  &.circle  { padding-left: 2em; list-style-type: circle !important; }
  &.square  { padding-left: 2em; list-style-type: square !important; }
  &.decimal { padding-left: 2em; list-style-type: decimal !important; }
}

a {
  &[onclick] { cursor: pointer; }
  &[href] {
    text-decoration: 2px underline var(--a-line-color);
    text-underline-offset: .2rem;
  }
  &:link    { color: var(--a-link-color); }
  &:visited { color: var(--a-visited-color); }
  &:hover   { color: var(--a-hover-color); }
}

input,
textarea,
select,
button.submit {
  padding: 5px;
  border-width: 1px;
  border-style: solid;
  border-radius: 5px;
  background-color: var(--input-bg-color);
  .night & {
    color: inherit;
    border-color: #445;
  }
}
input[type="submit"],
button.submit {
  cursor: pointer;
  color: #000 !important;
  background: linear-gradient(to bottom, #f0f7ff, #c0c7cf);
  &:hover { background: #c0c7cf; }
}
input[type="radio"],
input[type="checkbox"] {
  cursor: pointer;
}

details {
  > summary {
    transition: background-color 0.2s ease;
    cursor: pointer;
  }
  
  &:not([open]) > summary {
    overflow: hidden;
  }
  > summary::marker,
  > summary::-webkit-details-marker {
    content: "";
    display: none;
  }
  > summary::before {
    content: "\e5e1";
    display: inline-block;
    vertical-align: top;
    margin-right: .2rem;
    font-family: "Material Symbols Outlined";
    font-variation-settings: 'FILL' 1;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
  }
  &[open] > summary::before {
    transform: rotate(90deg) translateX(-2px);
  }
}

@media print {
  details:not([open]) {
    display: none;
  }
}

body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(auto, 900px) minmax(0, 1fr);
  grid-template-rows:
    max-content
    1fr
    repeat(10, auto)
    [footer-start] max-content [footer-end];
  row-gap: 0;
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-color);
  background-position: center, bottom right;
  background-repeat: repeat, no-repeat;
  background-attachment: scroll, fixed;
  color: var(--text-color);
  .night & {
    background-blend-mode: hard-light, hard-light;
  }
  @media print {
    display: block;
  }
}

header {
  grid-column: 1 / 4;
  grid-row: 1 / 2;
  height: 4rem;
  position: sticky;
  inset:0 0 auto 0;
  padding: 0px 10px;
  
  z-index: 100;

  & h1 {
    position: relative;
    font-family: inherit;
    font-size: 2rem;
    line-height: 4rem;
    white-space: nowrap;
    & a[href] {
      position: relative;
      color: inherit !important;
      z-index: 1;
      text-decoration: none;
    }
  }
  & .login-user {
    position: absolute;
    inset: 0 1rem 0 0;
    display: block;
    max-width: 900px;
    margin: auto;
    z-index: 102;
    text-align: right;
    font-family: var(--font-proportional);
    font-weight: normal;
    font-size: 80%;
    color: #fff;
    text-shadow: none;
    pointer-events: none;
    > span {
      display: inline-block;
      width: max-content;
      margin: 2px 3px auto auto;
      padding: 2px .5em;
      line-height: 1;
      border-radius: 5px;
      background-color: #0007;
      pointer-events: auto;
      > b {
        font-size: 110%;
      }
    }
    .is-scrolled & { opacity: 0; }
  }
}
header, .header-back-name {
  background-image: url(../img/back-abstract.webp)/* DL:linear-gradient(to right,#fffc,transparent) */;
  background-position: left top;
  background-repeat: no-repeat;
  background-color: var(--header-color);
  .night & {
    background-blend-mode: soft-light;
  }
}

footer {
  grid-column: 1 / 4;
  grid-row: footer-start / footer-end;
  height: 6rem;
  margin-top: auto;
  padding: 15px 10px 20px;
  background-color: var(--header-color);
  background-image: url(../img/back-abstract-reverse.webp)/* DL:linear-gradient(to left,#fffc,transparent) */;
  background-position: right top;
  background-repeat: no-repeat;
  text-align: right;
  font-size: 1.6rem;

  & span {
    display: inline-block;
  }
  & .copyright {
    margin-top: 0.5em;
  }
  
  @media screen {
    .night & {
      background-blend-mode: soft-light;
    }
  }
}

header,
.header-back-name,
footer {
  @media print {
    display: none;
  }
}
header h1,
.header-back-name,
footer {
  font-family: var(--base-font-family-min);
  font-weight: bold;
  paint-order: stroke;
}
header,
footer {
  & a:hover { opacity: 0.6; }
}

main {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  margin: 0;
  padding: 4rem 0 1rem;
  border-width: 0px 3px;
  border-style: double;

  @media print {
    border-width: 0;
  }
}

article{
  max-width: 860px;
  margin: 0 auto;
}

article h1 {
  font-size: 2.5rem;
}

* { border-color: var(--border-color); }

/* トグルボタン */
label.toggle-button {
  display: inline-block;
  position: relative;
  width: 4.5em;
  padding: 2px 1em;
  border: 1px solid var(--text-color);
  border-radius: 2em;
  line-height: 1;
  text-align: center;
  cursor: pointer;

  & input {
    display: none;
  }
  &:has(input:checked) {
    padding-left: 0;
    border-color: var(--accent-color);
  }
  &:has(input:not(:checked)) {
    padding-right: 0;
    border-color: #777;;
  }
  &::before {
    font-size: 85%;
    font-weight: bold;
    white-space: nowrap;
  }
  &:has(input:checked)::before {
    content: 'ON';
    color: var(--accent-color);
  }
  &:has(input:not(:checked))::before {
    content: 'OFF';
    color: #777;
  }
  &.yes-no:has(input:checked)::before {
    content: 'はい';
  }
  &.yes-no:has(input:not(:checked))::before {
    content: 'いいえ';
  }
  &::after {
    content: '';
    position: absolute;
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 100%;
    transition: .2s;
  }
  &:has(input:checked)::after {
    right: 2px;
    background-color: var(--accent-color);
  }
  &:has(input:not(:checked))::after {
    right: calc(3.5em - 4px);
    background-color: #777;
  }
}

/* // Nav
---------------------------------------------------------------------------------------------------- */
:root {
  --toggle-button-width: 6rem;
}
header nav {
  max-width: 900px;
  position: absolute;
  top: 2.6rem;
  left: 0;
  right: 0;
  margin: auto;
  pointer-events: none;

  display: flex;
  justify-content: end;

  .is-scrolled & { top: 0.8rem; }
  & a[href] { text-decoration: none; }
}
header nav,
.login-user {
  padding-right: calc(var(--toggle-button-width));
  @media screen and (width > 900px){
    padding-right: calc(var(--toggle-button-width) + 1rem - (100vw - 900px) / 2);
  }
}
/*  */
header nav .toggle-theme-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: var(--toggle-button-width);
  height: 3rem;
  top: .5rem;
  right: .5rem;
  padding: .3rem;
  font-size: 1.8rem;
  text-shadow: none;
  cursor: pointer;
  border-radius: 1.5rem;
  background-color: oklch(
    calc(var(--header-lightness) + 20%)
    calc((var(--header-chroma) + 0.018 * 2) / 3)
    var(--theme-main-hue)
  );
  .night & {
    background-color: oklch(
      calc(var(--header-lightness) + 20%)
      calc((var(--header-chroma) + 0.018 * 2) / 3)
      var(--theme-main-hue)
    );
  }
  box-shadow: inset 0 0 6px #0007;

  transition: background-color 0.5s;

  pointer-events: auto;
  user-select: none;

  --size: 2.4rem;

  > .icon {
    display: grid;
    place-items: center;
    width: var(--size);
    height: var(--size);
    padding: .3rem;
    z-index: 2;
    line-height: 1;

    &.light { color: #f70; }
    &.night { color: #0009; }
    .night &.light { color: #fff9; }
    .night &.night { color: #0df; }

    &::before {
      font-family: "Material Symbols Outlined";
      font-variation-settings: 'FILL' 1;
    }
    &.light::before { content: '\e518'; }
    &.night::before { content: '\e51c'; }
  }
  &::before {
    content: "";
    position: absolute;
    top: .3rem;
    left: .3rem;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background-color: #fff;
    z-index: 1;
    transition: all 0.3s ease;
  }
  .night &::before {
    left: calc(6rem - var(--size) - .3rem);
  }
}
header nav ul {
  display: flex;
  justify-content: end;
  align-items: center;
  margin-right: 1rem;
  .is-scrolled & {
    gap: .3rem;
  }
}
header nav ul li {
  position: relative;
  z-index: 200;
  margin: 0;
  --size: 5rem;
  width: calc(var(--size) * 1.41421356);
  &.small      { --size: 4rem; }
  &.very-small { --size: 3rem; }

  font-weight: bold;
  line-height: 1;
  
  cursor: pointer;
  pointer-events: auto;
  
  transition: all 0.3s ease;
  
  &:nth-last-child(even) { top: calc(var(--size) *  0.1); z-index: 1; }
  &:nth-last-child(odd)  { top: calc(var(--size) * -0.1); z-index: 2; }

  & a,
  & b {
    z-index: 1;
    display: grid;
    justify-items: center;
    line-height:1;
    text-decoration: none;
    color: #fff !important;
    text-shadow: none;
    user-select: none;

    .icon {
      z-index: 1;
      display: block;
      width: var(--size);
      height: var(--size);
      overflow: clip;
      display: grid;
      place-items: center;
      transform: rotate(45deg);
      background-color: var(--menu-icon-bg-color);
      background-image: linear-gradient(-45deg, transparent, #fff);
      background-blend-mode: overlay;
      outline: 1px solid #000;
      color: var(--menu-icon-color);

      @media screen {
        .night & {
          outline-color: #777;
        }
      }
      
      transition:
        inset  0.3s ease,
        margin 0.3s ease;

      & .material-symbols-outlined {
        margin-top: -0.5rem;
        margin-left: -0.5rem;
        transform: rotate(-45deg);
        font-size: calc(var(--size) * 0.6) !important;
        font-variation-settings: 'FILL' 1;
      }
      &:has(+ .label:empty) .material-symbols-outlined {
        margin-top: 0rem;
        margin-left: 0rem;
      }
    }
    .label {
      z-index: 2;
      display: block;
      position: absolute;
      bottom: -.2rem;
      text-align: center;
      white-space: nowrap;
      font-size: 1.2rem;
      -webkit-text-stroke: 3.5px #000;
      text-stroke: 3.5px #000;
      paint-order: stroke;
    }
    .icon:empty + .label {
      margin-top: calc((var(--size) / 2 + 0.5em) * -1);
    }
    &:hover {
      opacity: 1;
      .icon {
        background: var(--menu-icon-current-bg-color);
        color: var(--menu-icon-current-color);
      }
    }
    .current & {
      .icon {
        background: var(--menu-icon-current-bg-color);
        color: var(--menu-icon-current-color);
      }
    }
  }
  &.head {
    --size: 4rem;
    cursor: inherit;
    & b {
      .icon {
        background: #eee;
        outline: 3px double #555;
        color: #000;
        @media screen {
          .night & {
            background: #333;
            outline-color: #aaa;
            color: #fff;
          }
        }
        &::before {
          content: "";
          display: block;
          position: absolute;
          width : calc(var(--size) * 0.8);
          height: calc(var(--size) * 0.8);
          transform: rotate(-45deg);
          mask-size: 100%;
          mask-repeat: no-repeat;
          background-color: var(--text-color);
          mask-image: linear-gradient(transparent);
        }
      }
      .icon:empty + .label {
        position: static;
        font-size: 1.2rem;
        -webkit-text-stroke: unset;
        text-stroke: unset;
        color: #000;
        .night & { color: #fff }
      }
    }
  }
  
  .is-scrolled & {
    --size: 2.8rem;
    .icon {
      .material-symbols-outlined {
        margin-top: 0;
        margin-left: 0;
        font-size: 2.4rem !important;
      }
    }
    .icon:not(:empty) + .label { display: none; }
    &:hover .icon:not(:empty) + .label {
      display: block;
      position: absolute;
      bottom: 0;
    }

    &.head {
      .label { font-size: 1rem !important; }
    }
  }
}
@media screen and (width <= 735px){
  html:not(.is-scrolled) {
    header nav ul { margin-top: 2rem; margin-right: -5rem; }
    main { padding-top: 5rem; }
  }
}

/* // Button
---------------------------------------------------------------------------------------------------- */

#page-top-button {
  width: 80px;
  height: 60px;
  position: fixed;
  right: 0;
  bottom: 6rem;
  background: #7799ff;
  opacity: 0.6;
  z-index: 200;

  &:hover {
    opacity: 0.8;
  }
}
#page-top-button a {
  position: relative;
  display: block;
  width: 80px;
  height: 60px;
  text-decoration: none;

  &::before {
    content: '▲';
    font-size: 25px;
    color: #fff;
    position: absolute;
    width: 25px;
    height: 25px;
    top: -25px;
    bottom: 0;
    right: 0;
    left: 0;
    margin: auto;
    text-align: center;
    transform: scaleY(0.8);
  }
  &::after {
    content: 'PAGE TOP';
    font-size: 13px;
    color: #fff;
    position: absolute;
    top: 30px;
    bottom: 0;
    right: 0;
    left: 0;
    margin: auto;
    text-align: center;
  }
}

/* // Sidebar
---------------------------------------------------------------------------------------------------- */
aside#sidebar-left,
aside#sidebar-right {
  grid-row: 2 / 3;
  position: relative;
  overflow: hidden;

  > p {
    padding:5px;
  }
}
aside#sidebar-left {
  grid-column: 1;
  text-align: right;
}
aside#sidebar-top,
aside#sidebar-bottom {
  display: none;
  margin: 0;
  border-width: 0px 3px;
  border-style: double;
  border-color: var(--border-color);
  grid-column: 2 / 3;
  text-align: center;
}
aside#sidebar-top {
  padding: 5rem 0 0rem;
}

aside#sidebar-bottom {
  padding: 5rem 0 1rem;
  border-top-width: 1px;
  border-top-style: solid;
}

/* ////////// LayerEnd ////////// */
}
