@charset "utf-8";

@import "icons.css" layer(system);

@layer system {
/* // Body
---------------------------------------------------------------------------------------------------- */
body {
  background-image: url(../../_common/img/back-pattern.png), url(../img/back-first.png);
  @media screen and (width <= 735px){
    background-size: auto, 80%;
  }
}
article, .color-set {
  --monster-level-bg-color: hsl(
    var(--box-head-bg-color-h, 0),
    calc( var(--box-head-bg-color-s,   0%) * 0.5 ), 50%
  );
  --monster-head-bg-color: hsla(
    var(--box-head-bg-color-h, 225),
    calc( var(--box-head-bg-color-s,  9%) * 0.9 ),
    var(--box-head-bg-color-l, 65%),
    var(--box-head-bg-color-a, 0.4)
  );
  --s-icon-color: hsl(
    var(--box-head-bg-color-h, 0),
    calc( var(--box-head-bg-color-s,   0%) * 0.9 ), 40%
  );
  @media screen {
    .night & {
      --s-icon-color: hsl(
        var(--box-head-bg-color-h, 0),
        calc( var(--box-head-bg-color-s,   0%) * 0.9 ), 70%
      );
    }
  }
}


/* // Base
---------------------------------------------------------------------------------------------------- */
article {
  max-width: 800px;
}

/* // Font
---------------------------------------------------------------------------------------------------- */
#area-name h1 {
  font-family: var(--base-font-family-min);
}


/* // Name
---------------------------------------------------------------------------------------------------- */
#area-name {
  display: flex;
  justify-content: space-between;
  align-items: center;

  position: relative;
  
  margin-top: 1.5em;
  padding: 0px;
  border-width: 3px 0 0;
  border-style: solid;
  border-color: var(--monster-level-bg-color);
  background-image: linear-gradient(to bottom, var(--bg-color), transparent);
  @media print {
    background-image: none;
  }
}
#area-name .lv {
  order: -1;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  background-color: var(--monster-level-bg-color);
  background-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.4));
  color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 2px #000;
  text-align: center;
  font-size: 200%;
  font-weight: bold;
}
#area-name .name-taxa {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: inherit;
  container-type: inline-size;
}
#area-name h1 {
  max-width: 100%;
  padding: .25em 1rem;
  text-align: left;
  font-size: 200%;
  font-weight: bold;
  line-height: 1;

  word-break: keep-all;
  text-wrap: balance;
  text-align-last: end;
  overflow-wrap: break-word;
  line-break: strict;
  &:has(.monster-name){
    text-align-last: right;
  }
  & .monster-name {
    display: inline-block;
    font-size: 70%;
    line-height: 1;
  }

  .mount & {
    &:not(:has(.monster-name)) {
      &::before {
        content: "【";
      }

      &::after {
        content: "】";
      }
    }
  }
}
#area-name .taxa {
  position: absolute;
  top: -1.7em;
  left: 0;
  padding: .4em .5em .3em;
  border-radius: 5px 5px 0 0;
  line-height: 1;
  background: var(--monster-level-bg-color);
  color: #fff;
  text-shadow: 0 0 1px #000, 0 0 1px #000, 0 0 1px #000;
  font-weight: bold;
}

/* // Status
---------------------------------------------------------------------------------------------------- */
div.status {
  margin: .5rem 0;
  padding: .5rem 1rem;
  background: var(--box-base-bg-color);

  #tags + & {
    border-top: 1px dotted var(--box-outside-border-color);
  }
}
div.status div {
  display: flex;
  flex-wrap: wrap;
}
div.status dl {
  display: flex;
  margin-right: 1.5em;

  & dt {
    white-space: nowrap;
    &::after {
      content: ':';
      display: inline-block;
      width: 1em;
      text-align: center;
      font-weight: normal;
    }
  }
  & dd {
    word-break: auto-phrase;
    overflow-wrap: break-word;
  }
  & dl.price {
    align-items: end;
    margin-right: 0;
  }
  & dl.price dt {
    font-size: 85%;
    margin-right: .2em;
  }
  & dl.price dd + dt::before {
    content: '／';
    margin: 0 .5em;
  }
  & dl.price dt::after {
    display: none;
  }
  & dl.price dd small {
    margin-left: .2em;
  }
}
table.status {
  width: 100%;
  border-width: 1px;
  border-style: double;
  border-color: var(--box-outside-border-color);
  background-color: var(--box-base-bg-color);
  > thead {
    .lv     { width: 0em; }
    .name   { width: auto; }
    .acc    { width: 12%; }
    .atk    { width: 12%; }
    .eva    { width: 12%; }
    .def    { width: 12%; }
    .hp     { width: 12%; }
    .mp     { width: 12%; }
  }
  .mount & > thead {
    .lv     { width: 1.8em; }
    .name   { width: auto; }
    .acc    { width: 8.5%; }
    .atk    { width: 8.5%; }
    .eva    { width: 8.5%; }
    .def    { width: 8.5%; }
    .hp     { width: 8.5%; }
    .mp     { width: 8.5%; }
    .vit    { width: 8.5%; }
    .mnd    { width: 8.5%; }
  }
  &:not(#status-table):has(tbody tr:first-child:last-child) thead th.name > .text-part {
    display: none;
  }
  > thead {
    & th {
      background-color: var(--monster-head-bg-color);
    }
  }
  > tbody {
    border-top-width: 1px;
    border-top-style: solid;
    & td {
      padding: .2rem;
      border-width: 0 1px;
      border-style: solid;
      border-color: var(--box-inside-border-color);
      text-align: center;
      &.name .part {
        display: inline-block;
      }
    }
    > tr:nth-child(even) td {
      background-color: var(--box-even-rows-bg-color);
    }
  }
  .mount & > tbody {
    & td.lv {
      background-color: transparent;
      border-width: 0;
    }
    & tr:first-child td.lv {
      border-top-width: 1px;
      font-weight: bold;
    }
    & tr:not(:first-child) td.lv {
      font-size: 0px;
      color: transparent;
    }
    &:nth-of-type(even) tr td.lv {
      background-color: var(--box-even-rows-bg-color);
    }
  }
}

/* // Parts
---------------------------------------------------------------------------------------------------- */
.parts {
  display: flex;
  flex-wrap: wrap;
  margin: .5rem 0;
  padding: .3em 1rem;
  background: var(--box-base-bg-color);
  & dl {
    display: flex;
    margin-right: 1.5em;
    align-items: start;
    & dt {
      text-wrap: nowrap;
    }
    & dt::after {
      content: ':';
      display: inline-block;
      width: 1em;
      text-align: center;
      font-weight: normal;
    }
    & dd.parts-num-and-names {
      display: grid;
      grid-template-columns: max-content auto;
      > span.name {
        padding-left: 1em;
        text-indent: -1em;
        > span {
          text-wrap: nowrap;
        }
      }
    }
  }
}


/* // Skills
---------------------------------------------------------------------------------------------------- */
.skills {
  border: 0;
  margin: 1.8rem 0 0;
  padding-bottom: .5em;
  background: var(--box-base-bg-color);
  border-radius: 0;
  box-shadow: none !important;
  .parts + & {
    margin-top: .5rem;
  }

  & :is(h2, h2:nth-child(n+2)) {
    padding: .3rem .5rem;
    border-width: 0;
    background-color: var(--monster-head-bg-color);
    background-image: none;
    font-size: 110%;
  }
  & h2:nth-child(n+2) {
    margin: 1em 0 0;
  }
  & h3::first-letter {
    color: var(--s-icon-color);
  }
  & .s-icon::before {
    color: var(--s-icon-color);
  }
}

/* // Loots
---------------------------------------------------------------------------------------------------- */
.loots {
  margin-top: 1em;
  & h2 {
    font-size: 110%;
  }
  & dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    grid-template-rows: auto;
    border-width: 1px;
    border-style: solid;
    background-color: var(--box-base-bg-color);
    > dt {
      grid-column: 1;
      padding: .2rem;
      background-color: var(--monster-head-bg-color);
      border-width: 0px 1px 1px 0px;
      border-style: solid;
      text-align: center;
      min-width: 6em;
    }
    > dd {
      grid-column: 2;
      padding: .2rem .5rem;
      border-width: 0px 0px 1px;
      border-style: solid;
    }
    > dt:last-of-type,
    > dd:last-of-type {
      border-bottom-width: 0px;
    }
  }
}

/* // Description
---------------------------------------------------------------------------------------------------- */
.description {
  margin-top: 1.5em;
  padding-bottom: .5em;
  border: 0;
  background: var(--box-base-bg-color);
  border-radius: 0;
  box-shadow: none !important;
}
.description :is(h2, h2:nth-child(n+2)) {
  margin: 0;
  padding: 0 .3em;
  border-width: 1px 0px;
  border-style: solid;
  border-color: var(--box-outside-border-color);
  background-image: none;
  font-size: 115%;
}
.box.description h2 ~ h2 {
  margin-top: 1em;
}

/* // Author
---------------------------------------------------------------------------------------------------- */
#author {
  width: max-content;
  min-width: 50%;
  margin: 2em 0 0 auto;
  padding: .5em;
  text-align: right;
  border-width: 0 1px 1px 0px;
  border-style: solid;
}


/* ////////// LayerEnd ////////// */
}