@media screen {

  #main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
  }

  #navigation {
    width: 500px;
    position: fixed;
    overflow: auto;
    top: 0;
    left: -525px;

    background: #ECECEC;
    min-height: 100%;
    height: 100%;
    height: 100vh;

    overflow: scroll;
    -webkit-overflow-scrolling: touch;
    padding: 9px;
    padding-top: 10px;

    transition: left .2s ease-out;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);

    z-index: 1;
  }

  #navigation.open {
    left: 0;
  }

  #opener {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    stroke: #E2E2E2;
    fill: #E2E2E2;
    visibility: hidden;
  }

  #opener:hover {
    stroke: #777;
    fill: #777;
  }

  #header {
    height: 30px;
  }

  #update {
    float: right;
  }

  .CodeMirror {
    border: 1px solid #eee;
    height: calc(100vh - 24px);
    box-sizing: border-box;
    background: #fbfbfb;
    box-shadow: inset 0 0 1px rgba(0,0,0,.8);
  }

  .material-icons {
    color: #333;
    cursor: pointer;
  }

  .material-icons:hover {
    color: #525252;
  }

  .material-icons:active {
    color: #000;
  }

  .pagedjs_page {
    box-shadow: 0 0 4px #ccc;
  }

}

:root {
      --margin: 100px;
  }

  #opener, #controls, #next, #prev, #navigation {
    display: none;
  }

  @media screen {

    body {
      background-color: whitesmoke;
    }

    #main {
      display: block;
    }

    #opener, #controls, #next, #prev, #navigation {
      display: unset;
    }


    #viewer {
      margin-top: 40px;
    }

    .pagedjs_page {
      background-color: #fdfdfd;
      margin-bottom: calc(var(--margin) / 2);
      flex: none;
    }

    .pagedjs_pages {
      width: calc(var(--pagedjs-width) * 2);
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: flex-start;
      transform-origin: 0 0;
      margin: 0 auto;
    }

    .pagedjs_pages > .section {
      width: calc(var(--pagedjs-width) * 2);
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: flex-start;
    }

    .pagedjs_first_page {
      margin-left: 50%;
    }

    #controls {
      margin: 20px 0;
      text-align: center;
    }

    .arrow {
      position: fixed;
      top: 50%;
      margin-top: -32px;
      font-size: 64px;
      color: #E2E2E2;
      font-family: arial, sans-serif;
      font-weight: bold;
      cursor: pointer;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
      text-decoration: none;
    }

    #prev {
      left: 0;
    }

    #next {
      right: 0;
    }

    .arrow .material-icons {
      font-size: 64px;
    }

    .navlink {
      margin: 14px;
      display: block;
      text-align: center;
      text-decoration: none;
      color: #ccc;
    }

    .arrow:hover, .navlink:hover {
      color: #777;
    }

    .arrow:active, .navlink:hover {
      color: #000;
    }

    #toc {
      display: block;
      margin: 10px auto;
    }

    #navigation h1 {
      width: 200px;
      font-size: 16px;
      font-weight: normal;
      color: #232323;
      margin-bottom: 10px;
      margin-left: 24px;
    }

    #navigation h2 {
      font-size: 14px;
      font-weight: normal;
      color: #B0B0B0;
      margin-bottom: 20px;
      text-align: left;
      margin-left: 24px;
    }

    #navigation ul {
      padding-left: 36px;
      margin-left: 0;
      margin-top: 12px;
      margin-bottom: 12px;
      width: 340px;
    }

    #navigation ul li {
      list-style: decimal;
      margin-bottom: 10px;
      color: #cccddd;
      font-size: 12px;
      padding-left: 0;
      margin-left: 0;
    }

    #navigation ul li a {
      color: #ccc;
      text-decoration: none;
    }

    #navigation ul li a:hover {
      color: #fff;
      text-decoration: underline;
    }

    #navigation ul li a.active {
      color: #fff;
    }

    #navigation #cover {
      display: block;
      margin: 24px auto;
    }

    #opener {
      position: fixed;
    }

    #next, #prev {
      visibility: hidden;
    }
  }

  .box {
    font-size: 1.25rem; /* 20 */
    background-color: #ddd;
    position: relative;
    padding: 100px 20px;

    outline: 2px dashed #ccc;
    outline-offset: -10px;

    -webkit-transition: outline-offset .15s ease-in-out, background-color .15s linear;
    transition: outline-offset .15s ease-in-out, background-color .15s linear;

    width: 400px;
    margin: 80px auto;
  }

  .box.is-dragover {
    outline-offset: -20px;
    outline-color: #000;
    background-color: #ccc;
  }

  .box .box__dragndrop {
    display: inline;
  }

  .box .box__icon {
    width: 100%;
    height: 80px;
    fill: #92b0b3;
    display: block;
    margin-bottom: 40px;
    font-size: 100px;
  }

  .box.is-uploading .box__input,
  .box.is-success .box__input,
  .box.is-error .box__input
  {
    visibility: hidden;
  }

  .box__uploading,
  .box__success,
  .box__error
  {
    display: none;
  }

  .box.is-uploading .box__uploading,
  .box.is-success .box__success,
  .box.is-error .box__error
  {
    display: block;
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;

    -webkit-transform: translateY( -50% );
    transform: translateY( -50% );
  }

  .box__uploading
  {
    font-style: italic;
  }
  .box__success
  {
    -webkit-animation: appear-from-inside .25s ease-in-out;
    animation: appear-from-inside .25s ease-in-out;
  }

  @-webkit-keyframes appear-from-inside
  {
    from	{ -webkit-transform: translateY( -50% ) scale( 0 ); }
    75%		{ -webkit-transform: translateY( -50% ) scale( 1.1 ); }
    to		{ -webkit-transform: translateY( -50% ) scale( 1 ); }
  }
  @keyframes appear-from-inside
  {
    from	{ transform: translateY( -50% ) scale( 0 ); }
    75%		{ transform: translateY( -50% ) scale( 1.1 ); }
    to		{ transform: translateY( -50% ) scale( 1 ); }
  }

  .box__file + label
	{
		max-width: 80%;
		text-overflow: ellipsis;
		white-space: nowrap;
		cursor: pointer;
		display: inline-block;
		overflow: hidden;
	}

  #input {
    display: none;
  }
