a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style-type: none;
  padding: 0;
}

ul > li > ul {
  margin-left: 1em;
}

li {
  padding: 0.2em 0;
}

button, input {
  font-size: medium;
  margin: 0.5em 0.1em;
}

button {
  background: #eee;
  border: 0;
  color: #07d;
  font-weight: bold;
  padding: 0.2em 0.5em;
  transition: 0.3s;
}

button:hover {
  background: #07d;
  color: white;
}

input[type="checkbox"] {
  height: 1em;
  margin-left: 0.2em;
  width: 1em;
}

#vid-seek {
  margin-left: 0.5em;
  min-width: 10em;
  vertical-align: middle;
  width: 25%;
}

#vid-volume {
  margin-left: 0.5em;
  vertical-align: middle;
  width: 5em;
}

select {
  font-size: medium;
  margin: 0.1em;
}

h1, h2 {
  font-size: medium;
}

dd {
  border-left: 0.2em solid #ccc;
  margin-left: 0.3em;
  padding-left: 0.5em;
}

table {
  border: 1px outset #888;
}

th, td {
  border: 1px inset #888;
}

#footer {
  margin-top: 2em;
  margin-bottom: 3em;
}

#result {
  background: #fff;
  color: #f00;
  font-size: small;
  font-weight: bold;
}

.log-marker {
  background: #fff;
  color: #00f;
}

.select-with-note > select {
  float: left;
  margin-right: 1em;
}

.select-with-note > br {
  clear: both;
}

.page-nav {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.warn, .scrambles, .partially {
  background: #ff8;
  color: #000;
}

.err, .drops, .shortage {
  background: #f88;
  color: #000;
}

.disabled {
  background: #ccc;
  color: #000;
}

.epg-table {
  border: 0;
  border-spacing: 0;
}

.epg-row-head > th {
  border: 1px solid #aaa;
  vertical-align: bottom;
}

.epg-row-tail > th {
  border: 1px solid #aaa;
  vertical-align: top;
}

.epg-row-head > td, .epg-row-tail > td {
  border: 0;
}

.epg-col-head {
  border: 0;
  padding: 1px 0 0 0;
  vertical-align: top;
}

.epg-col-head > div {
  border: 1px solid #aaa;
  box-sizing: border-box;
  color: #fff;
  font-weight: bold;
  text-align: center;
}

.t4, .t5 {
  background: #0277bd;
}

.t6, .t7 {
  background: #00695c;
}

.t8, .t9, .t10 {
  background: #558b2f;
}

.t11, .t12, .t13 {
  background: #f9a825;
}

.t14, .t15, .t16 {
  background: #ef6c00;
}

.t17, .t18, .t19 {
  background: #c62828;
}

.t20, .t21, .t22 {
  background: #6a1b9a;
}

.t23, .t0, .t1, .t2, .t3 {
  background: #283593;
}

.t17.tnow, .t18.tnow, .t19.tnow {
  color: #ef6c00 !important;
}

.tnow {
  color: #c62828 !important;
}

.epg-col {
  background: #aaa;
  border: 0;
  font-size: small;
  position: relative;
  vertical-align: top;
}

.epg-col > div {
  border-color: #aaa;
  border-style: solid;
  border-width: 1px 0;
  box-sizing: border-box;
  color: #000;
  overflow: auto;
  position: absolute;
}

.lavel-disabled, .lavel-disabled > a {
  background: #444;
  color: #fff;
  font-weight: bold;
}

.lavel-reserved, .lavel-reserved > a {
  background: #f00;
  color: #fff;
  font-weight: bold;
}

.lavel-view, .lavel-view > a {
  background: #00f;
  color: #fff;
  font-weight: bold;
}

.epg-list {
  margin-bottom: 0.5em;
}

.epg-list > div {
  color: #000;
}

.epg-list-list > li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epg-present {
  font-size: small;
  margin-left: 1em;
  opacity: 0.8;
}

.cont-0, .cont-8 {
  background: #ffffe0;
}

.cont-1 {
  background: #e6e6fa;
}

.cont-2 {
  background: #fff0f5;
}

.cont-3 {
  background: #ffe4e1;
}

.cont-4 {
  background: #f0fff0;
}

.cont-5 {
  background: #e0ffff;
}

.cont-6, .cont-9 {
  background: #ffefd5;
}

.cont-7 {
  background: #ffc0cb;
}

.cont-10, .cont-11 {
  background: #f0f8ff;
}

.cont-15 {
  background: #f5f5f5;
}

.cont-12, .cont-13, .cont-14, .cont-16 {
  background: #fff;
}

.past {
  opacity: 0.8;
}

.escape-text {
  color: transparent;
  font-size: xx-small;
}

#now {
  border: 2px solid #f00;
}

.video-container {
  line-height: 0;
  max-width: var(--vcont-max-width, 100%);
  overflow: hidden;
  position: relative;
  width: max-content;
}

#video {
  width: 100%;
}

.video-full-container {
  display: flex;
  flex-direction: row;
}

.video-full-container:fullscreen {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.video-full-container:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.video-full-container:fullscreen > .video-container {
  max-width: 100%;
  width: 100%;
}

.video-full-container:-webkit-full-screen > .video-container {
  max-width: 100%;
  width: 100%;
}

.video-full-container:fullscreen #video {
  max-height: 100%;
}

.video-full-container:-webkit-full-screen #video {
  max-height: 100%;
}

.video-full-container-flex-row:fullscreen {
  flex-direction: row;
}

.video-full-container-flex-row:-webkit-full-screen {
  flex-direction: row;
}

.video-full-container-flex-row:fullscreen > .video-container {
  height: 100%;
  max-height: 100%;
  max-width: none;
  width: auto;
}

.video-full-container-flex-row:-webkit-full-screen > .video-container {
  height: 100%;
  max-height: 100%;
  max-width: none;
  width: auto;
}

.video-full-container-flex-row:fullscreen #video {
  height: 100%;
  max-height: none;
  max-width: 100%;
  width: auto;
}

.video-full-container-flex-row:-webkit-full-screen #video {
  height: 100%;
  max-height: none;
  max-width: 100%;
  width: auto;
}

.full-control {
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
}

.exit-control {
  display: none;
  left: 0;
  position: absolute;
  top: 0;
}

.live-control {
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.comment-control {
  bottom: 20%;
  display: flex;
  left: 50%;
  opacity: 0;
  position: absolute;
  transform: translateX(-50%);
  width: 40%;
}

.full-control > button, .exit-control > button, .live-control > button {
  font-size: x-large;
  margin: 0.5em;
  padding: 0.5em;
}

.comment-control > input, .comment-control > button {
  font-size: large;
  margin: 1em 0.2em;
  opacity: 0.8;
  padding: 0.2em;
}

.comment-control > input {
  flex: 1;
}

.comment-control > .nico {
  background-color: #bbf;
  color: #000;
}

.comment-control > .refuge {
  background-color: #fbb;
  color: #000;
}

.video-full-container .full-control:hover {
  opacity: 1;
}

.video-full-container:fullscreen .full-control {
  display: none;
}

.video-full-container:-webkit-full-screen .full-control {
  display: none;
}

.video-full-container:fullscreen .exit-control {
  display: block;
  opacity: 0;
}

.video-full-container:-webkit-full-screen .exit-control {
  display: block;
  opacity: 0;
}

.video-full-container:fullscreen .exit-control:hover {
  opacity: 1;
}

.video-full-container:-webkit-full-screen .exit-control:hover {
  opacity: 1;
}

.video-full-container .live-control:hover {
  opacity: 1;
}

.video-full-container .comment-control:hover {
  opacity: 1;
}

.data-broadcasting-browser-container {
  overflow: hidden;
}

.data-broadcasting-browser-content {
  display: none;
}

.remote-control > button {
  height: 2em;
  margin-top: 0.2em;
  min-width: 2em;
}

#key1, #key2, #key3, #key4, #key18, #key19, #key20, #key21, #key22, #key23, #key24 {
  min-width: 3em;
}

#key18 {
  border: 2px solid #aae;
}

#key20 {
  background-color: gray;
  color: white;
}

#key21 {
  background-color: rgb(0, 114, 214);
  color: white;
}

#key22 {
  background-color: rgb(201, 0, 0);
  color: white;
}

#key23 {
  background-color: rgb(27, 135, 0);
  color: white;
}

#key24 {
  background-color: rgb(227, 178, 0);
  color: white;
}

.remote-control-indicator {
  height: 6em;
  white-space: pre-line;
}

.jikkyo-comments {
  /* The top/bottom border of .jikkyo-comments must be 1px */
  border: 1px solid #ccc;
  flex: 0 0 25%;
  font-size: small;
  margin-left: 1px;
  overflow: auto;
}

.jikkyo-comments > .closed {
  border-top: 1px dotted #aaa;
}

.jikkyo-comments > div > .nico {
  background: #fff;
  color: #00a;
  margin-left: 0.2em;
  margin-right: 0.2em;
}

.jikkyo-comments > div > .refuge {
  background: #fff;
  color: #900;
  margin-left: 0.2em;
  margin-right: 0.2em;
}

.jikkyo-comments .dark {
  color: #fff;
}

.jikkyo-comments .light {
  color: #000;
}

.video-full-container:fullscreen .jikkyo-comments {
  display: none;
}

.video-full-container:-webkit-full-screen .jikkyo-comments {
  display: none;
}

.dplayer-danmaku-item {
  display: inline-block;
  font-weight: bold;
  line-height: 1;
  pointer-events: none;
  -webkit-text-stroke: 1px #000;
  text-stroke: 1px #000;
  user-select: none;
  white-space: nowrap;
}

.dplayer-danmaku-item--demo {
  position: absolute;
  visibility: hidden;
}

.dplayer-danmaku-dark {
  -webkit-text-stroke: 1px #fff;
  text-stroke: 1px #fff;
}

.dplayer-danmaku-right {
  position: absolute;
  right: 0;
  transform: translateX(100%);
}

.dplayer-danmaku-right.dplayer-danmaku-move {
  animation-name: danmaku;
  animation-timing-function: linear;
  will-change: transform;
}

.dplayer-danmaku-top, .dplayer-danmaku-bottom {
  left: 0;
  position: absolute;
  text-align: center;
  width: 100%;
}

.dplayer-danmaku-top.dplayer-danmaku-move, .dplayer-danmaku-bottom.dplayer-danmaku-move {
  animation-name: danmaku-center;
  animation-timing-function: linear;
  will-change: visibility;
}

@keyframes danmaku {
  from {
    transform: translateX(100%);
  }
}

@keyframes danmaku-center {
  from {
    visibility: visible;
  }
  to {
    visibility: visible;
  }
}

:root {
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  body {
    background: #200;
    color: #ebb;
  }

  a {
    color: #c6f;
  }

  a:visited {
    color: #f7e;
  }

  button {
    background: #400;
    color: #c6f;
  }

  button:hover {
    background: #c6f;
  }

  dd {
    border-left-color: #544;
  }

  #result {
    background: inherit;
    color: #f55;
  }

  .log-marker {
    background: inherit;
    color: #88f;
  }

  .warn, .scrambles, .partially {
    background: #882;
    color: inherit;
  }

  .err, .drops, .shortage {
    background: #a44;
    color: inherit;
  }

  .disabled {
    background: #544;
    color: inherit;
  }

  .epg-col {
    background: #300;
  }

  .epg-col > div {
    border-color: #300;
    color: inherit;
  }

  .epg-list > div {
    color: inherit;
  }

  .cont-0, .cont-8 {
    background: #404012;
  }

  .cont-1 {
    background: #171747;
  }

  .cont-2 {
    background: #4d2b1a;
  }

  .cont-3 {
    background: #4d1b15;
  }

  .cont-4 {
    background: #1a4d1a;
  }

  .cont-5 {
    background: #154d4d;
  }

  .cont-6, .cont-9 {
    background: #4d3612;
  }

  .cont-7 {
    background: #661e0f;
  }

  .cont-10, .cont-11 {
    background: #1a354d;
  }

  .cont-15 {
    background: #421b1b;
  }

  .cont-12, .cont-13, .cont-14, .cont-16 {
    background: #200;
  }

  #now {
    border-color: #f55;
  }

  .jikkyo-comments > div > .nico {
    background: inherit;
    color: #66c;
  }

  .jikkyo-comments > div > .refuge {
    background: inherit;
    color: #c66;
  }
}

.inact-setting {
  opacity: 0.3;
}

div.disabled-on-checked, div.enabled-on-checked, div.sub-setting {
  margin-left: 2em;
}

input[type=checkbox]:checked + .disabled-on-checked, input[type=checkbox] + .enabled-on-checked {
  opacity: 0.5;
}

input[type=checkbox]:checked + .enabled-on-checked {
  opacity: 1;
}

label:has(input[type=checkbox]:checked) + .disabled-on-checked,
label:has(input[type=checkbox]:checked) + .disabled-on-checked + .disabled-on-checked,
label:has(input[type=checkbox]) + .enabled-on-checked,
label:has(input[type=checkbox]) + .enabled-on-checked + .enabled-on-checked {
  opacity: 0.5;
}

label:has(input[type=checkbox]:checked) + .enabled-on-checked,
label:has(input[type=checkbox]:checked) + .enabled-on-checked + .enabled-on-checked {
  opacity: 1;
}

label.expand-on-checked {
  display: none;
}

label:has(input[type=checkbox]:checked).expand-on-checked, label:has(input[type=checkbox]) + .expand-on-checked {
  display: none;
}

label:has(input[type=checkbox]).expand-on-checked, label:has(input[type=checkbox]:checked) + .expand-on-checked {
  display: unset;
}
