* {
  font-family: sans-serif;
}

html {
  height: 100%;
  line-height: 0;
  font-size: 0;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

body {
  position: relative;
  right: 0;
  margin: 0;
  font-size: medium;
  line-height: normal;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px;
  background-color: white;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 60%));
  z-index: 100;
  height: 65px;
}

.wrapper {
  position: relative;
  top: 60px;
  display: flex;
  flex-direction: row;
}

.footer {
  position: relative;
  bottom: 0;
  width: 100%;
  padding: 1.2em;
  margin-top: 3em;
  font-size: small;
}

.footer p {
  margin: 0 8px;
}

.title {
  display: flex;
  font-size: x-large;
  justify-content: center;
  text-align: center;
  margin: 6px 0 6px 0;
}

/*  ハンバーガーメニュー  */

.nav {
  position: absolute;
  right: 0;
  pointer-events: visible;
}

.c-button {
  position: relative;
  display: inline-block;
  text-decoration: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.p-hamburger {
  position: relative;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 40px;
  height: 40px;
  margin: auto;
  border-radius: 50%;
  border: 1px solid #000000;
  box-shadow: 0 0 2rem transparent;
  outline: none;
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
  margin-right: 12px;
}

.p-hamburger:hover,
.p-hamburger:focus,
.p-hamburger:focus-visible {
  outline-color: hsla(230, 73%, 42%, 70%);
  outline-width: 2px;
}

.p-hamburger__line {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 18px;
  height: 2px;
  background-color: #000000;
  -webkit-transition: inherit;
  transition: inherit;
}

.p-hamburger__line::before,
.p-hamburger__line::after {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  background-color: inherit;
  content: "";
  -webkit-transition: inherit;
  transition: inherit;
}

.p-hamburger__line::before {
  top: -5px;
}

.p-hamburger__line::after {
  top: 5px;
}

.p-hamburger[aria-expanded="true"] .p-hamburger__line {
  background-color: transparent;
}

.p-hamburger[aria-expanded="true"] .p-hamburger__line::before,
.p-hamburger[aria-expanded="true"] .p-hamburger__line::after {
  top: 0;
  background-color: #000000;
}

.p-hamburger[aria-expanded="true"] .p-hamburger__line::before {
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.p-hamburger[aria-expanded="true"] .p-hamburger__line::after {
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.navigation {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 60px;
  width: 80%;
  height: 100%;
  background-color: white;
  transform: translateX(100%);
  -webkit-transition: transform .3s ease-in-out;
  transition: transform .3s ease-in-out;
  z-index: 50;
  padding-top: 20px;
}

html.is-drawerActive {
  overflow: hidden;
}

.is-drawerActive body {
  overflow: clip;
  pointer-events: none;
}

.is-drawerActive .navigation {
  width: 60dvw; /* メディアクエリの方で設定 */
  position: fixed;
  top: 60px;
  transform: translateX(0);
  height: 100svh;
  background-color: white;
  box-shadow: 0 10px 10px 0 rgb(0, 0, 0);
  overflow-y: auto;
  right: 0;
  pointer-events: visible;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.is-drawerActive .main,
.is-drawerActive .footer {
  overflow: clip;
  filter: blur(5px) grayscale(30%);
}

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

/*  ========  */

.name {
  grid-column: 3;
  font-weight: bold;
}

.name::after {
  content: ": ";
  font-size: medium;
  margin-right: .4em;
}

.text {
  grid-column: 3;
  padding-left: 1em;
}

.message {
  display: grid;
  grid-template-columns: 1em min-content 1fr;
  padding-top: .2em;
  padding-bottom: .2em;
  margin: 0;
  padding-left: 0;
  column-gap: 2px;
  align-items: center;
}

/* main クラス関連 */

.main {
  position: relative;
  margin: 8px;
  padding-left: 1.8em;
  padding-right: 1.8em;
  min-height: 100%;
  bottom: 0;
  overflow-wrap: break-word;
  word-break: break-all;
}

.main h2 {
  position: relative;
  padding: 1rem 2rem;
  border-bottom: 6px solid black;
  letter-spacing: .1em;
  margin-bottom: .8em;
}

.main h2::first-letter {
  font-size: xx-large;
  color: hsl(351, 73%, 42%);
}

.main h2::after {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: calc(15% + 4em);
  height: 6px;
  content: "";
  background-color: brown;
}


.main-logs section[id] h2::before {
  width: fit-content;
  padding: 0 8px;
  font-size: xx-large;
  font-weight: bold;
  color: aliceblue;
  background-color: brown;
  border-radius: 12px 12px 0 0;
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  margin-top: -1.8em;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.main-logs .chap[id] h2::before {
  counter-increment: chap_number 1;
  content: counter(chap_number, upper-roman);
}

.main-logs .preplay[id] h2::before {
  content: "N";
}



.main section {
  margin-bottom: 56px;
}

.main .main-logs section {
  padding-top: 90px;
  margin-top: -86px;
}

.main-logs h2 {
  padding-left: 3.6em
}

/* 章番号表示 */

.main-logs {
  counter-reset: chap_number;
}


/* ========== */

/* index クラス関連 */

.index h2::first-letter {
  color: hsl(230, 73%, 42%);
}

.index h2::after {
  background-color: royalblue;
}

.index ul {
  line-height: 2.2em;
  counter-reset: list_number;
  list-style: none;
  font-weight: bold;
}

.index li::before {
  display: inline flow-root list-item;
  font-size: 1.2em;
  font-weight: 600;
  text-indent: -2em;
}

.index li.chap::before {
  counter-increment: list_number 1;
  content: counter(list_number, upper-roman);
}

.index li.preplay::before {
  content: "N";
}

/* =========== */

/* participants クラス関連 */

.main .participants {
  margin-bottom: 20px;
}

.participants h2::first-letter {
  color: hsl(293, 68%, 46%);
}

.participants h2::after {
  background-color: hsl(293, 70%, 30%);
}

/* grid */

.participants ul.grid-container {
  display: grid;
  row-gap: 8px;
  grid-template-columns: [role] auto [playername] 1fr;
  grid-template-rows: auto;
  padding-left: 0;
}

.participants ul.grid-container >li.subgrid-container {
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: min-content;
  align-items: center;
  grid-column: span 2;
  /** word-break: break-all; **/
  border-left: 2px solid var(--my-color);
}

.participants .grid-container .grid-item {
  padding: 2px;
  grid-column: 2 / 4;
  grid-row: auto;
  display: flex;
  place-items: center;
}

.participants .grid-container .charactor-name {
  display: grid;
  grid-template-columns:
    [dash] 3em
    [name] 1fr;
  align-items: center;
  justify-items: start;
  text-align: start;
  font-size: smaller;
}

.participants .grid-container .charactor-name::before {
  content: '';
  width: 2.4em;
  height: 2px;
  filter: brightness(130%) saturate(70%);
  margin-right: .4em;
}

.participants .pl-name,
.participants .gm-name {
  font-weight: bold;
  font-size: 1.2em;
}

.participants .pl .role,
.participants .gm .role {
  font-weight: bold;
  font-size: 80%;
  margin-right: 6px;
  background-color: var(--my-color);
  color: white;
  padding: 0 8px;
  grid-column: 1;
  height: fit-content;
  align-self: flex-start;
}
/* ====== */

.nav-list {
  list-style: none;
  padding: 2em;
  margin: 0;
  padding-top: 0;
  padding-bottom: 5em;
}

.nav-list li {
  margin-bottom: .8em;
}

.nav-list figure {
  margin: 0;
}

.chatlog {
  padding-left: .2em;
  width: 100%;
}

.chara {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-right: 8px;
  padding-bottom: 10px;
}

.charactor-name {
  font-weight: bold;
}

.nav-list .player-name {
  font-size: small;
}

.nav-list .player-name::before {
  content: "PL:";
  font-size: small;
}

.charactor-image {
  margin: 8px;
  display: flex;
  justify-content: center;
}

.charactor-image img {
  /* メディアクエリの方で設定 */
  max-width: 50vw;
  max-height: 30lvh;
}

/* 画像を正方形にトリミングする際の設定 */
.is-imageclip .charactor-image img {
  width: 30vw;
  height: 30vw;
  object-fit: cover;
  object-position: top center;
  max-width: 180px;
  max-height: 140px;
}

figure.insert-pic {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

figure.insert-pic img {
  max-height: 40vh;
  object-fit: cover;
  object-position: top center;
}

.chara a {
  font-weight: bold;
}

.check,
.disable-check {
  margin: 0 1em 1.2em 1em;
  font-size: smaller;
}

input[checkbox] {
  transform: scale(1.2);
}

/* tekey対応用 */

.diceroll::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23000' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M15.528 2.973a.75.75 0 0 1 .472.696v8.662a.75.75 0 0 1-.472.696l-7.25 2.9a.75.75 0 0 1-.557 0l-7.25-2.9A.75.75 0 0 1 0 12.331V3.669a.75.75 0 0 1 .471-.696L7.443.184l.004-.001.274-.11a.75.75 0 0 1 .558 0l.274.11.004.001zm-1.374.527L8 5.962 1.846 3.5 1 3.839v.4l6.5 2.6v7.922l.5.2.5-.2V6.84l6.5-2.6v-.4l-.846-.339Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  margin-right: 4px;
}

.chatlog .timestamp {
  color: hsl(225, 2%, 30%);
  font-size: .6em;
  margin: 0 16px 4px .8em;
}

.is-disable-timestamp .timestamp {
  display: none;
}

/*タブ1以外に適用するスタイル*/
[class*=tab]:not(.tab1) {
  margin-left: 2.2em;
  padding-left: 8px;
  text-indent: 0;
  background: hsl(250, 12%, 95.4%);
  border-left: 5px hsl(235.7, 5.6%, 49%) double;
}

[class*=tab]:not(.tab1)::before {
  font-size: medium;
  font-weight: bold;
  padding-right: 3px;
}

.is-disable [class*=tab]:not(.tab1){
  display: none;
}

/* ========== */

/* 発言者まとめ用 */

.main .chatlog .joined .name{
  display: none;
}

/* ========== */

/* メディアクエリ */

@media screen and (max-width:500px) {
  .is-drawerActive .navigation {
    width: 90%;
  }
  .main {
    padding: 0;
  }
  .data {
    padding: 0;
  }
}

@media screen and (min-width: 501px) and (max-width: 850px) {
  .is-drawerActive .navigation {
      width: 60%;
  }
}

@media screen and (min-width: 851px) {
  .nav button {
    display: none;
  }
  .navigation {
      width: 30%;
      /* メディアクエリの方で設定 */
      position: fixed;
      height: 100%;
      background-color: white;
      box-shadow: 0 2px 5px 0 rgb(0, 0, 0);
      overflow-y: auto;
      right: 0;
      pointer-events: visible;
      overscroll-behavior: contain;
      display: flex;
      flex-direction: column;
      transition: none;
      -webkit-transition: none;
      transform: none;
  }
  .main {
    width: 70%;
  }
  .charactor-image img {
    max-width: 25vw;
    max-height: 25vh;
  }
  .footer {
    width: 70%;
  }
}

/* ================ */
