/* =========================================================
   DESKTOP — 561px AND ABOVE
========================================================= */

@media (min-width:561px){

  :root{
    --ink:#1a1a1f;
    --panel:#37353d;
    --panel-alt:#403e46;
    --cover-bg:#e7e5df;
    --muted:#a9a5ac;
    --stamp:#c9382c;
    --dot:rgba(255,255,255,0.045);

    --colL:30%;
    --colR:70%;
  }


  /* =========================================================
     RESET
  ========================================================= */

  *{
    box-sizing:border-box;
    margin:0;
    padding:0;
  }

  html{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }

  body{
    background:#0c0c0f;
    color:#f1efe9;
    font-family:'Inter',sans-serif;

    min-height:100vh;

    display:flex;
    justify-content:center;

    -webkit-user-select:none;
    -moz-user-select:none;
    -ms-user-select:none;
    user-select:none;
  }

  a{
    color:inherit;
    text-decoration:none;
    -webkit-tap-highlight-color:transparent;
  }


  /* =========================================================
     SITE WRAPPER
  ========================================================= */

  .site-wrap{
    width:100%;
    max-width:1100px;
    min-height:100vh;

    background:var(--ink);

    box-shadow:
      0 0 60px rgba(0,0,0,0.6);
  }


  /* =========================================================
     HEADER
  ========================================================= */

  header.site-header{
    display:grid;

    grid-template-columns:
      var(--colL)
      var(--colR);

    min-height:125px;

    background:
      radial-gradient(
        var(--dot) 1.2px,
        transparent 1.2px
      ) 0 0/10px 10px,

      linear-gradient(
        135deg,
        #2a2830,
        #161519
      );

    border-bottom:3px solid var(--stamp);
  }


  /* =========================================================
     LOGO
  ========================================================= */

  .logo-holder{
    display:flex;

    align-items:center;
    justify-content:flex-start;

    padding:20px 28px;

    min-width:0;

    border-right:
      1px solid rgba(255,255,255,0.08);
  }

  .logo-holder a{
    display:flex;

    align-items:center;

    width:100%;

    min-width:0;
  }

  .logo-holder img{
    display:block;

    width:100%;
    max-width:280px;

    height:auto;

    aspect-ratio:650 / 223;

    object-fit:contain;

    -webkit-user-drag:none;
    user-drag:none;
  }


  /* =========================================================
     SITE TITLE
  ========================================================= */

  .site-title-wrap{
    display:flex;

    align-items:center;
    justify-content:center;

    min-width:0;

    padding:20px 30px;

    overflow:hidden;
  }

  .site-title{
    margin:0;
    padding:0;

    min-width:0;
    max-width:100%;

    font-family:'Inter',sans-serif;

    font-size:clamp(
      1.8rem,
      3vw,
      3rem
    );

    font-weight:800;

    line-height:1.1;

    color:#f1efe9;

    text-align:center;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
  }


  /* =========================================================
     MAIN
  ========================================================= */

  main{
    display:flex;

    flex-direction:column;

    width:100%;
  }


  /* =========================================================
     SERIES CARD
  ========================================================= */

  .series-card{
    display:grid;

    grid-template-columns:
      var(--colL)
      var(--colR);

    width:100%;

    border-bottom:
      1px solid rgba(255,255,255,0.06);
  }


  /* =========================================================
     COVER
  ========================================================= */

  .cover-cell{
    background:#201f25;

    padding:25px;

    display:flex;

    align-items:center;
    justify-content:center;

    min-width:0;
  }

  .cover-link{
    display:flex;

    align-items:center;
    justify-content:center;

    position:relative;

    width:100%;
    max-width:300px;

    aspect-ratio:2 / 3;

    overflow:hidden;

    border-radius:8px;

    background:var(--cover-bg);

    border:
      3px solid rgba(255,255,255,0.35);

    box-shadow:
      inset 0 0 0 1px rgba(0,0,0,0.15),
      0 8px 22px rgba(0,0,0,0.45);

    transition:
      background-color .15s ease,
      border-color .15s ease,
      box-shadow .15s ease;
  }

  .cover-link:hover{
    border-color:var(--stamp);

    box-shadow:
      inset 0 0 0 2px var(--stamp),
      0 10px 25px rgba(0,0,0,0.5);
  }

  .cover-link:active{
    background:var(--stamp);
  }

  .cover-link img{
    display:block;

    width:100%;
    height:100%;

    object-fit:cover;

    -webkit-user-drag:none;
    user-drag:none;
  }

  .cover-link span{
    padding:10px;

    font-size:.8rem;

    color:#8a8781;

    text-align:center;
  }


  /* =========================================================
     SERIES INFO
  ========================================================= */

  .info-cell{
    display:flex;

    flex-direction:column;

    min-width:0;
  }


  /* =========================================================
     SERIES NAME
  ========================================================= */

  .series-name{
    display:flex;

    align-items:center;
    justify-content:center;

    min-width:0;

    min-height:80px;

    padding:18px 24px;

    background:#0f0e12;

    border-bottom:
      1px solid rgba(255,255,255,0.08);

    font-family:'Inter',sans-serif;

    font-size:clamp(
      1.2rem,
      2.2vw,
      2rem
    );

    font-weight:800;

    line-height:1.2;

    letter-spacing:.5px;

    color:#f1efe9;

    text-align:center;

    text-transform:uppercase;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

    transition:
      background-color .15s ease,
      color .15s ease;
  }

  .series-name:hover{
    color:var(--stamp);
  }

  .series-name:active{
    background:var(--stamp);
    color:#fff;
  }


  /* =========================================================
     ONE PIECE ONE-SHOTS
  ========================================================= */

  .series-name.one-shots-title{
    font-size:clamp(
      .85rem,
      1.5vw,
      1.35rem
    );

    white-space:nowrap;
  }


  /* =========================================================
     CHAPTER SECTION
  ========================================================= */

  .chapter-section{
    display:block !important;

    width:100%;

    margin:0;

    padding:18px 25px 25px;

    background:rgba(255,255,255,0.035);

    border:
      1px solid rgba(255,255,255,0.10);

    border-radius:10px;

    overflow:hidden;
  }

  .chapter-section h2{
    display:block !important;

    width:100%;

    margin:0 0 14px;

    padding:0;

    font-size:24px;

    line-height:1.3;
  }


  /* =========================================================
     CHAPTER CONTROLS
  ========================================================= */

  .chapter-controls{
    display:flex;

    align-items:center;

    width:100%;

    gap:10px;

    margin:0 0 18px;

    padding:0;

    flex-wrap:nowrap;
  }

  .chapter-search{
    display:block;

    flex:1 1 auto;

    width:auto;
    min-width:0;

    height:44px;

    padding:10px 13px;

    background:transparent;

    border:
      1px solid #444;

    border-radius:7px;

    color:inherit;

    font-family:inherit;

    font-size:14px;

    outline:none;
  }

  .chapter-search::placeholder{
    color:var(--muted);
  }

  .chapter-select{
    display:block;

    flex:0 0 190px;

    width:190px;
    min-width:190px;

    height:44px;

    padding:10px 13px;

    background:transparent;

    border:
      1px solid #444;

    border-radius:7px;

    color:inherit;

    font-family:inherit;

    font-size:14px;

    outline:none;
  }


  /* =========================================================
     CHAPTER LIST
  ========================================================= */

  .chapter-list{
    display:grid !important;

    grid-template-columns:
      repeat(4,minmax(0,1fr));

    width:100%;

    gap:10px;

    margin:0;
    padding:0;

    list-style:none;

    min-width:0;

    box-sizing:border-box;
  }


  /* =========================================================
     CHAPTER LIST ITEM
  ========================================================= */

  .chapter-list li{
    display:block !important;

    width:100%;

    min-width:0;

    margin:0;
    padding:0;

    box-sizing:border-box;
  }


  /* =========================================================
     CHAPTER LINK
  ========================================================= */

  .chapter-list li a,
  .chapter-link{

    position:relative;

    display:flex !important;

    flex-direction:column !important;

    align-items:center !important;
    justify-content:center !important;

    width:100% !important;

    min-width:0 !important;

    min-height:68px !important;

    height:auto !important;

    margin:0;

    padding:8px 10px !important;

    gap:0;

    background:var(--panel);

    border:
      1px solid rgba(255,255,255,.10);

    border-radius:8px;

    color:inherit !important;

    text-align:center;

    text-decoration:none;

    box-sizing:border-box;

    overflow:hidden !important;

    transition:
      background-color .15s ease,
      color .15s ease,
      border-color .15s ease;
  }


  /* =========================================================
     ALTERNATING CHAPTER COLORS
  ========================================================= */

  .chapter-list li:nth-child(even) a,
  .chapter-list li:nth-child(even) .chapter-link{
    background:var(--panel-alt);
  }


  /* =========================================================
     CHAPTER HOVER
  ========================================================= */

  .chapter-list li a:hover,
  .chapter-link:hover{
    background:var(--stamp);

    border-color:var(--stamp);

    color:#fff !important;
  }


  /* =========================================================
     CHAPTER NUMBER
  ========================================================= */

  .chapter-link .chapter-number,
  .chapter-list li a .chapter-number{

    display:block !important;

    width:100% !important;

    min-width:0 !important;

    height:auto !important;

    max-height:none !important;

    margin:0 0 3px !important;

    padding:0 !important;

    font-family:inherit !important;

    font-size:17px !important;

    font-weight:800 !important;

    line-height:1.2 !important;

    color:inherit !important;

    text-align:center !important;

    visibility:visible !important;

    opacity:1 !important;

    white-space:nowrap !important;

    overflow:hidden !important;

    text-overflow:ellipsis !important;

    flex:none !important;
  }


  /* =========================================================
     CHAPTER TITLE
  ========================================================= */

  .chapter-link .chapter-name,
  .chapter-list li a .chapter-name{

    display:-webkit-box !important;

    width:100% !important;

    min-width:0 !important;

    height:auto !important;

    max-height:none !important;

    margin:0 0 3px !important;

    padding:0 !important;

    font-family:inherit !important;

    font-size:12px !important;

    font-weight:600 !important;

    line-height:1.3 !important;

    color:inherit !important;

    text-align:center !important;

    visibility:visible !important;

    opacity:1 !important;

    white-space:normal !important;

    overflow:hidden !important;

    overflow-wrap:anywhere !important;

    word-break:break-word !important;

    text-overflow:ellipsis !important;

    -webkit-box-orient:vertical !important;

    -webkit-line-clamp:2 !important;

    flex:none !important;
  }


  /* =========================================================
     CHAPTER DATE
  ========================================================= */

  .chapter-link .chapter-date,
  .chapter-list li a .chapter-date{

    display:block !important;

    width:100% !important;

    min-width:0 !important;

    height:auto !important;

    margin:0 !important;

    padding:0 !important;

    font-family:inherit !important;

    font-size:10px !important;

    font-weight:400 !important;

    line-height:1.2 !important;

    color:var(--muted) !important;

    text-align:left !important;

    visibility:visible !important;

    opacity:.7 !important;

    white-space:nowrap !important;

    overflow:hidden !important;

    text-overflow:ellipsis !important;

    flex:none !important;
  }

  .chapter-list li a:hover .chapter-date,
  .chapter-link:hover .chapter-date{
    color:#fff !important;

    opacity:1 !important;
  }


  /* =========================================================
     LEGACY CHAPTER CLASSES
     ========================================================= */

  .chapter-title,
  .volume-title{

    min-width:0;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;
  }


  /* =========================================================
     LOADING / ERROR
  ========================================================= */

  .loading,
  .error,
  .no-results{

    display:block !important;

    grid-column:1 / -1;

    width:100%;

    padding:30px 10px;

    margin:0;

    text-align:center;

    opacity:.7;
  }

  .error{
    color:#ff6b6b;
  }


  /* =========================================================
     FOOTER
  ========================================================= */

  footer{
    background:#0f0e12;

    border-top:3px solid var(--stamp);
  }

  .footer-links{
    display:grid;

    grid-template-columns:
      repeat(3,1fr);
  }

  .footer-links a{

    padding:22px 10px;

    font-family:'Anton',sans-serif;

    font-size:1.3rem;

    text-align:center;

    text-transform:uppercase;

    border-right:
      1px solid rgba(255,255,255,0.1);

    transition:
      background-color .15s ease,
      color .15s ease;
  }

  .footer-links a:last-child{
    border-right:none;
  }

  .footer-links a:hover,
  .footer-links a:active{
    background:var(--stamp);

    color:#fff;
  }

  .copyright{
    padding:18px;

    font-size:.85rem;

    color:var(--muted);

    letter-spacing:.5px;

    text-align:center;
  }


  /* =========================================================
     LARGE DESKTOP — 1200px+
  ========================================================= */

  @media (min-width:1200px){

    .site-wrap{
      max-width:1200px;
    }

    header.site-header{
      min-height:140px;
    }

    .logo-holder{
      padding:25px 30px;
    }

    .logo-holder img{
      max-width:320px;
    }

    .site-title-wrap{
      padding:20px 30px;
    }

    .cover-cell{
      padding:30px;
    }

    .cover-link{
      max-width:320px;
    }

    .series-name{
      min-height:90px;
    }

    .chapter-section{
      padding:20px 30px 28px;
    }

    .chapter-list{
      grid-template-columns:
        repeat(4,minmax(0,1fr));
    }

    .chapter-list li a,
    .chapter-link{
      min-height:72px !important;

      padding:9px 12px !important;
    }

    .chapter-link .chapter-number,
    .chapter-list li a .chapter-number{
      font-size:18px !important;
    }

    .chapter-link .chapter-name,
    .chapter-list li a .chapter-name{
      font-size:13px !important;
    }

    .chapter-link .chapter-date,
    .chapter-list li a .chapter-date{
      font-size:10px !important;
    }
  }


  /* =========================================================
     TABLET / SMALL DESKTOP — 561px TO 800px
  ========================================================= */

  @media (min-width:561px) and (max-width:800px){

    .site-wrap{
      max-width:800px;
    }

    header.site-header{
      min-height:105px;
    }

    .logo-holder{
      padding:16px 20px;
    }

    .logo-holder img{
      max-width:220px;
    }

    .site-title-wrap{
      padding:16px 20px;
    }

    .site-title{
      font-size:1.5rem;
    }

    .cover-cell{
      padding:20px;
    }

    .series-name{
      min-height:65px;

      padding:14px 18px;

      font-size:1.15rem;
    }

    .chapter-section{
      padding:16px 18px 20px;
    }

    /*
       Two columns on smaller desktop/tablet.
       This prevents cards from becoming too narrow.
    */

    .chapter-list{
      grid-template-columns:
        repeat(2,minmax(0,1fr));

      gap:9px;
    }

    .chapter-list li a,
    .chapter-link{
      min-height:64px !important;

      padding:8px 10px !important;
    }

    .chapter-link .chapter-number,
    .chapter-list li a .chapter-number{
      font-size:16px !important;
    }

    .chapter-link .chapter-name,
    .chapter-list li a .chapter-name{
      font-size:11px !important;
    }

    .chapter-link .chapter-date,
    .chapter-list li a .chapter-date{
      font-size:9px !important;
    }

    .chapter-controls{
      flex-wrap:nowrap;
    }

    .chapter-select{
      flex:0 0 170px;

      width:170px;
      min-width:170px;
    }
  }


  /* =========================================================
     CLICK / HOVER FEEDBACK
  ========================================================= */

  a:active{
    color:#fff;
  }

  .cover-link:active{
    background:var(--stamp);
  }

  .series-name:active{
    background:var(--stamp);

    color:#fff;
  }

  .chapter-list li a:active,
  .chapter-link:active{
    background:var(--stamp);

    border-color:var(--stamp);

    color:#fff !important;
  }

  .chapter-list li a:active .chapter-date,
  .chapter-link:active .chapter-date{
    color:#fff !important;

    opacity:1 !important;
  }

  .footer-links a:active{
    background:var(--stamp);

    color:#fff;
  }

}

