@charset "utf-8";
/* // 基本レイアウト
---------------------------------------------------------------------------------------------------- */
body {
  overflow: hidden;
}
#base {
  padding: 0 2rem;
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: 1fr max-content max-content;
  grid-template-rows: max-content max-content max-content 1fr max-content max-content;
  grid-template-areas: 
    " menu  menu sheet"
    "topic  side sheet"
    "close  side sheet"
    " chat  side sheet"
    " form  form  form"
    " foot  foot  foot";
}
#menubar {
  grid-area: menu;
}
#topic {
  grid-area: topic;
}
#chat-closes-area {
  grid-area: close;
}
#chat-area {
  grid-area: chat;
}
.chat.main {
}
.chat.sub {
}
#sidebar {
  grid-area: side;
}
#main-form {
  grid-area: form;
}
#footer {
  grid-area: foot;
}
#sheet-area {
  grid-area: sheet;
}
#tablist-area {
  display: none;
}
/* チャットエリア */
#chat-area {
  display: flex;
  overflow: auto;
  margin: -1.5rem -1rem 0 0;
}
#chat-closes-area:empty + #chat-area {
  margin-top: -2rem;
}
#chat-area .chat {
  margin: 1rem 1rem 0 0;
  flex: 1 10 100%;
}
#chat-area .chat.main {
  flex: 1 4 100%;
}
#chat-closes-area {
  display: flex;
  justify-content: flex-end;
}
#chat-closes-area .chat {
}
#chat-closes-area .chat + .chat {
  margin-left: 1rem;
}

/* サイドバー */
#sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow: auto;
  position: relative;
}
#sidebar:not([data-layout="row"]) { width: 14em; }

#sidebar:not([data-layout="row"]).close { width: 2em; }
#sidebar[data-layout="row"].close { height: 2em; }

#sidebar.close > * {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 !important;
  padding: .5em 0 !important;
}
#sidebar:not([data-layout="row"]).close > * {
  flex-direction: column;
}
#sidebar > .button.toggle {
  display: flex;
  justify-content: center;
  align-items: center;
}
#sidebar[data-layout="row"].close > * {
  flex-grow: 0;
  flex-basis: 2em;
}
#sidebar:not([data-layout="row"]).close > * + * {
  margin-top: .3rem !important;
}
#sidebar[data-layout="row"].close > * + * {
  margin-left: .3rem !important;
}
#sidebar.close > * > * {
  display: none !important;
}
#sidebar > .button.toggle,
#sidebar.close > *::before {
  font-family: "Font Awesome 5 Free";
  font-weight: bold;
}
#sidebar.close #status::before { content:"\f0c0"; }
#sidebar.close #memo::before   { content:"\f249"; }
#sidebar.close #status::after { content:attr(data-num); font-weight:bold; }
#sidebar.close #memo::after   { content:attr(data-num); font-weight:bold; }

#sidebar .button.toggle::before { content:"\f422"; }
#sidebar.close .button.toggle::before { content:"\f424"; }

#sidebar:not([data-layout="row"]).close #round { overflow: hidden; }
#sidebar[data-layout="row"].close > .box { flex-basis: 4em; white-space: nowrap; overflow: hidden; }
#sidebar.close #round #round-value { display: inline-block !important; }
#sidebar:not([data-layout="row"]).close #round #round-value { width: 1em; }

#sidebar > .box { margin: .5rem 0; }
#sidebar > .box:first-child { margin-top: 0; }
#sidebar > .box:last-child  { margin-bottom: 0; }
@media (min-width: 601px) {
  #sidebar[data-layout="row"] {
  }
  #sidebar[data-layout="bottom"] {
    flex-direction: column-reverse;
  }
  #sidebar[data-layout="bottom"] > .box:first-child { margin-bottom: 0; }
  #sidebar[data-layout="bottom"] > .box:last-child  { margin-top: 0; }
  #sidebar[data-layout="row"] {
    flex-direction: row;
  }
  #sidebar[data-layout="row"] > .box { margin: 0 .5rem; }
  #sidebar[data-layout="row"] > .box:first-child { margin-left: 0; }
  #sidebar[data-layout="row"] > .box:last-child  { margin-right: 0; }
}
#round {
  flex-shrink: 0;
}

/* // ヘッダ
---------------------------------------------------------------------------------------------------- */
#sp-header {
  display: none;
}

/* // メニュー
---------------------------------------------------------------------------------------------------- */
#menubar {
  display: grid;
  padding: 0 1em;
  grid-template-columns: auto auto;
  align-items: stretch;
}
#menubar ul {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#menubar ul li {
  flex-basis: 10rem;
  text-align: center;
  border-width: 0 .1rem;
  border-style: solid;
  border-color: var(--border-color-faint);
}
#menubar ul li + li {
  border-left: 0;
}
#menubar ul li a {
  display: block;
  padding: calc(.5em / 0.8);
  color: inherit;
  background: none;
  white-space: nowrap;
  font-size: .8em;
}
#menubar ul li a::before {
  margin-right: .2rem;
  font-size: calc(1em / 0.8);
}
#menubar ul li a:hover {
  box-shadow: inset 0 0 .5rem #7af;
}
#menubar ul + ul {
  justify-content: flex-end;
  font-size: 80%;
}
#menubar ul + ul li {
  border: 0;
}
#menubar ul + ul li + li {
  margin-left: .3rem;
}
#menubar ul + ul input {
  width: 100%;
}
#menubar li#menu-mute-button {
  flex-basis: 5rem;
}
#menubar li#menu-mute-button a {
  
}

/* // チャットログ
---------------------------------------------------------------------------------------------------- */
.chat {
  display: grid;
  grid-template-rows: max-content auto;
  grid-gap: .2rem;
  overflow: hidden;
  position: relative;
}
.chat h2 {
  border-radius: .5rem;
  font-size: 1.3rem;
  cursor: move;
}
.chat h2 label {
  display: inline-block;
  padding: .4rem;
  cursor: pointer;
}
.chat h2 label input {
  opacity: 0;
  width: 0;
  height: 0;
}
.chat h2 label input:focus+span::before {
  box-shadow: 0 0 0 .1rem #09f, 0 0 .5rem .0rem #09f;
}
.chat h2 label input+span::before {
  display: inline-block;
  content: "　";
  width: 1em;
  margin-right: 0.1em;
  border-radius: .2em;
  background-color: #000;
  color: transparent;
  transform: scale(1);
}
.chat h2 label:hover input+span::before {
  box-shadow: inset 0 0 .5rem #9df;
}
.chat h2 label input:checked+span::before {
  content: "✔";
  color: #f77;
  text-shadow: 
    #711  .1rem .1rem, #711 -.1rem -.1rem,
    #711 -.1rem .1rem, #711  .1rem -.1rem,
    #711   0rem .1rem, #711   0rem -.1rem,
    #711 -.1rem  0rem, #711  .1rem   0rem;
}
/* フォントサイズ調整バー */
.chat .option {
  position: absolute;
  top: .3rem;
  right: 3rem;
  font-size: 1rem;
}
.chat .option::before {
  content: "文字サイズ " attr(data-value) "%";
  display: block;
  margin-bottom: .1rem;
  text-align: center;
  opacity: 0.8;
}
.chat .option input[type="range"] {
  width: 10rem;
}
/* 閉じるボタン */
.chat .close.button {
  position: absolute;
  top: 0;
  right: 0;
}
/* メイン */
.chat.main {
  font-size: 1.6rem;
}
.chat.main .logs {
  line-height: 1.8;
}
.chat.main .logs dl {
  display: grid;
  grid-template-columns: auto 1fr;
}
.chat.main .logs dl dt {
  grid-column: 1;
}
.chat.main .logs dl dd {
  grid-column: 2;
  min-height: calc((1em * 1.8) - .1rem);
}
.chat.main .logs dl dt {
  padding-right: .6em;
  font-size: 90%;
  line-height: 2;
  text-align: right;
}
.chat.main .logs dl dt::after {
  content: ":";
  display: inline-block;
  width: .6em;
  margin-right: -.6em;
  color: #fff;
  font-weight: 100;
  text-align: center;
  opacity: 0.5;
}
.chat.main .logs dl dt:empty::after {
  display: none;
}

.chat.main .logs dl.system dt::after {
  content: ">";
  width: 1em;
}
.chat.main .logs dl dd {
  min-width: 10em;
}
.chat.main .logs dl dd.info {
  grid-column: 1 / span 2;
  padding: 0 .5em;
}
.chat.main .input-form {
  display: none;
}
/* サブ */
.chat.sub {
  display: grid;
  grid-template-rows: max-content auto max-content;
  font-size: 1.4rem;
}
.chat.sub .logs {
  line-height: 1.6;
}
.chat.sub dl dd {
  padding-left: .5em;
  min-height: calc((1em * 1.6) - .1rem);
}
.chat.sub .logs dl:after {
  top: 0;
}
/* クローズ */
.chat.close {
}
.chat.close > * {
  display: none;
}
.chat.close > h2 {
  display: block;
}

/* // フォーム
---------------------------------------------------------------------------------------------------- */

/* メイン */
#main-form {
  z-index: 10;
  max-height: 50vh;
}
#main-form .input-form {
  display: grid;
  grid-gap: .5rem;
  grid-template-columns: auto 1.2fr 1fr;
}
@media (max-width: 900px) {
  #main-form .input-form {
    grid-template-columns: auto 1fr;
  }
  #main-form .input-form .namelist-area {
    grid-row: span 2;
  }
}
#main-form .input-form + .input-form {
  padding-left: 1rem;
  border-left: .1rem solid var(--border-color-pale);
}
#main-form .namelist-area {
  display: grid;
  margin-bottom: -.2rem;
  grid-gap: 0;
  grid-template-columns: 1.5em 1fr 2em;
  grid-template-rows: max-content auto;
}
#main-form .namelist-area #npc-del-button {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
#main-form .namelist-area #npc-edit-button {
  border-radius: 0;
  border-left-width: 0;
}
#main-form .namelist-area #npc-add-button {
  border-top-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  border-left-width: 0;
}
#main-form .namelist-area select.form-name {
  grid-column: span 3;
  min-width: 8em;
  max-width: 13em;
  height: auto;
  padding: .5rem 0 0;
  font-size: 0.9em;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top-width: 0;
}
#main-form .namelist-area select.form-name option {
  font-weight: bold;
  padding: 0 .5rem;
  border-bottom: .1rem solid var(--border-color);
}
#main-form input[type="color"] {
  width: 5em;
}
#main-form input#form-color-text {
  width: 7em;
}
#main-form .comm-config-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
}
#main-form .comm-area {
  margin-right: 2rem;
}

/* 装飾ボタン */
.decoration-buttons {
  margin-right: 2rem;
}
/* チェックボタン */
.check-buttons {
  margin-top: -2rem;
  margin-right: 3.5rem;
  text-align: right;
}
.check-buttons button {
  border-top: 0;
}
.check-buttons button:first-child {
  width: 4rem;
  border-radius: 0 0 0 .8rem;
}
.check-buttons button:last-child {
  width: 2.5rem;
  border-left: 0;
  border-radius: 0 0 .8rem 0;
}

.input-form .add-button {
  vertical-align: super;
}
.input-form #sub-comm {
  margin-top: .5rem;
}

/* ダイス欄 */
#form-dice-0 {
  margin-top: 1rem;
}
.form-dice {
  position: relative;
  display: grid;
  grid-gap: .3rem 1rem;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: max-content;
  padding-right: 2rem;
}
.form-dice .edit.button {
  position: absolute;
  right: -.4rem;
  height: 2.3rem;
}
.form-dice .del.button {
  bottom: 0rem;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.form-dice .add.button {
  bottom: 2.2rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.form-dice .expand.button {
  bottom: 4.8rem;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.form-dice .shrink.button {
  bottom: calc(4.8rem + 2.2rem);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.form-dice .dice-button {
  grid-template-columns: auto 1fr auto;
  width: 100%;
  margin: 0;
  overflow: visible;
}
.form-dice .dice-button button   { grid-column: 3; grid-row: 1; }
.form-dice .dice-button textarea { grid-column: 2; grid-row: 1; }
.form-dice .dice-button i        { grid-column: 1; grid-row: 1; }
.form-dice .dice-button button   {
  border-width: 0 0 0 .1rem;
  border-radius: 0 .5em .5em 0;
}
.form-dice .dice-button button::before {
  content: "⏎";
}
.form-dice .dice-button i {
  position: relative;
  display: block;
  width: 2.4em;
  border-width: 0 .1rem 0 0;
  border-radius: .5em 0 0 .5em;
}
.form-dice .dice-button i::before {
  position: absolute;
  left: 0;
  right: 0;
  bottom: .4rem;
  margin: auto;
  text-align: center;
  font-size: 1.4rem;
  line-height: 1;
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: bold;
  text-shadow: none
}
.form-dice .dice-button i:hover::before {
  color: #fff;
}
.form-dice .dice-button textarea[data-lock="full"] + i { background: linear-gradient(to right, rgba(255,255,  0, 0.6), transparent); color: #fec; }
.form-dice .dice-button textarea[data-lock="dice"] + i { background: linear-gradient(to right, rgba(255, 50,  0, 0.6), transparent); color: #fcc; }
.form-dice .dice-button textarea[data-lock="name"] + i { background: linear-gradient(to right, rgba(200,  0,255, 0.6), transparent); color: #fcf; }
.form-dice .dice-button textarea[data-lock="off" ] + i { background: linear-gradient(to right, rgba(  0,255,255, 0.6), transparent); color: #cff; }
.form-dice .dice-button textarea[data-lock="memo"] + i { background: linear-gradient(to right, rgba(100,255,  0, 0.6), transparent); color: #cfb; }
.form-dice .dice-button textarea[data-lock="full"] + i::before { content: "\f023"; }
.form-dice .dice-button textarea[data-lock="dice"] + i::before { content: "\f6d1"; }
.form-dice .dice-button textarea[data-lock="name"] + i::before { content: "\f007"; }
.form-dice .dice-button textarea[data-lock="off" ] + i::before { content: "\f075"; transform: scale(-1, 1); }
.form-dice .dice-button textarea[data-lock="memo"] + i::before { content: "\f249"; }


/* // ラウンド
---------------------------------------------------------------------------------------------------- */
#sidebar:not(.close) #round #round-value::before {
  content: 'ラウンド: ';
}
#sidebar.close #round #round-value::before {
  font-family: "Font Awesome 5 Free";
  font-weight: bold;
  content:"\f562";
}
[data-layout="row"] #round {
  flex-basis: 8em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* // ステータス
---------------------------------------------------------------------------------------------------- */
#status {
  padding-right: 0;
}
#status #status-body {
}
#status #status-body::-webkit-scrollbar {
  width: .4rem;
  height: .4rem;
}
#status #status-body > dl > dd[id*="stt-url"] {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  background-color: rgba(0,0,0, var(--box-bg-opacity));
}
#status #status-body > dl:hover > dd[id*="stt-url"] {
  display: block;
}
#status #status-body > dl > dd[id*="stt-url"] a::before {
  content: "\f35d";
  display: inline-block;
  width: 1em;
  height: 1em;
  font-family: "Font Awesome 5 Free";
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1;
}
#sidebar:not([data-layout="row"]) #status #status-body > dl {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}
[data-layout="row"] #status {
  flex-grow: 5;
  padding-bottom: 0;
  padding-right: 2em;
}
[data-layout="row"] #status #status-body {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
}
[data-layout="row"] #status #status-body > dl {
  align-content: start;
  border: 0;
}
[data-layout="row"] #status #status-body > dl dt {
  height: 1.1em;
}
[data-layout="row"] #status #status-body > dl dt:hover {
  height: auto;
}
[data-layout="row"] #status .edit.button {
  position: absolute;
  display: block;
  height: 1.4em;
}
[data-layout="row"] #status .shrink.button {
  right: .1em;
  bottom: 3.4em;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  z-index: 10;
}
[data-layout="row"] #status .expand.button {
  right: .1em;
  bottom: 2em;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  z-index: 10;
}

/* // 共有メモ
---------------------------------------------------------------------------------------------------- */
#memo {
  position: relative;
  padding-bottom: 1.2em;
  overflow: auto;
  flex-shrink: 0;
}
#memo #memo-list {
}
#memo ul#memo-list {
}
#memo ul#memo-list li {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: .3em 0;
  border-bottom: .1rem solid var(--border-color-pale);
}
[data-layout="row"] #memo {
  overflow: hidden;
  flex-basis: 15em;
}
[data-layout="row"] #memo ul#memo-list {
  position: absolute;
  width: auto;
  height: 100%;
  overflow: auto;
}
[data-layout="row"] #memo ul#memo-list li {
  display: inline-block;
  max-width: 8em;
  margin-right: .3rem;
  padding: .3em;
  background-color: rgba(127,127,127,0.15);
  border: .1rem solid var(--border-color-pale);
  border-radius: .8em;
  font-size: 90%;
}

/* // ユニットシート
---------------------------------------------------------------------------------------------------- */
#sheet-area {
  position: relative;
  width: 18.5em;
  transition-property: left, right, opacity;
  transition-duration: 0.25s;
  transition-timing-function: ease-in;
}
#sheet-area:not(.left) {
  margin-right: -2rem;
}
#sheet-area.left {
  margin-left: -2rem;
}
#sheet-area:not(.left).closed {
  margin-left: calc(-18.5em + 2rem);
  right: calc(-18.5em + 2rem);
}
#sheet-area.left.closed {
  margin-right: calc(-18.5em + 2rem);
  left: calc(-18.5em + 2rem);
}

#sheet-area:not(.left) .sheet {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  animation-name: sheetrightfade;
}
#sheet-area.left .sheet {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  animation-name: sheetleftfade;
}
.sheet {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  animation-duration: 0.25s;
  animation-timing-function: ease-out;
}
.sheet {
}
@keyframes sheetrightfade {
  from { opacity: 0.5; left: 16em; right: -16em; }
  to   { }
}
@keyframes sheetleftfade {
  from { opacity: 0.5; left: -16em; right: 16em; }
  to   { }
}
#sheet-area.closed {
  opacity: 0.5;
}
#sheet-area.closed:hover {
  opacity: 1;
}
.sheet#close-area {
  display: none;
  cursor: pointer;
  animation-duration: 0.15s;
}
.closed .sheet:not(#close-area) {
  display: none;
}
.closed .sheet#close-area {
  display: block !important;
}
#sheet-area:not(.left) .sheet#close-area {
  animation-name: closerightfade;
}
#sheet-area.left .sheet#close-area {
  animation-name: closeleftfade;
}
@keyframes closerightfade {
  from { opacity: 1; left: -5em; }
  to   { }
}
@keyframes closeleftfade {
  from { opacity: 1; right: -5em; }
  to   { }
}

/* // フッタ
---------------------------------------------------------------------------------------------------- */
#footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
}
#footer dl {
  display: flex;
  position: relative;
  margin: .5rem;
  line-height: 1.2rem;
}
#footer dl dt {
  white-space: nowrap;
}
#footer dl dt::after {
  content: ":";
  margin-right: .3em;
}
#footer dl dd {
  margin-right: 2.5em;
  font-size: 0.8em;
}
#footer dl + dl {
  margin-left: 2.5em;
}
#footer dl dd:last-child {
  margin-right: 0;
}
/* // フロートボックス
---------------------------------------------------------------------------------------------------- */
.float-box {
  position: fixed;
  top: 3rem;
  left: 5%;
  right: auto;
  bottom: auto;
  width: max-content;
  height: max-content;
  max-height: 80%;
  margin: auto;
  padding: .5rem;
  border-radius: 1rem;
  transform: scaleY(0);
  opacity: 0;
  overflow: auto;
  resize: both;
}
.float-box.open {
  transform: none;
  opacity: 1;
}
.float-box h2 {
  cursor: move;
}
.float-box table th {
  white-space: nowrap;
}
/* 入室 */
#enter-form {
  height: max-content;
  max-height: 100vh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
/* 退室 */
#exit-form {
  max-height: 16em;
  top: 3rem;
  left: 0;
  right: 0;
}
/* 各種 */
#edit-topic {
  top: 5em;
  left: 1.5em;
  right: auto;
  bottom: auto;
}
#edit-topic textarea {
  width: 60vw;
  max-width: 100vw;
  max-height: 80vh;
  margin-top: .1rem;
}
#edit-npc {
  top: auto;
  left: 10em;
  right: auto;
  bottom: 10em;
}
#edit-npc textarea {
  width: 20em;
  max-width: 65vw;
  max-height: 80vh;
  margin-top: .1rem;
}
#image-insert {
  top:auto;
  left:20em;
  right: auto;
  bottom:10em;
  width:30em;
}
#bg-set,
#bgm-set {
  width: 30em;
}
#bg-set input,
#bgm-set  input {
  width: 100%;
}
.float-box .image-preview-area {
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
}
#member-list {
  top: auto;
  left: 2em;
  right: auto;
  bottom: 2em;
  min-width: 14em;
}
#config-user,
#config-room {
  width: 36em;
}
#config-user p,
#config-room p {
  padding: .5em;
  line-height: 1.6;
}
#help-window {
  width: 50em;
  height: 80%;
}
#help-window .box-body {
  overflow: auto;
  padding-bottom: 2em;
}

