@charset "utf-8";

@layer system {
/* // Body
---------------------------------------------------------------------------------------------------- */
body {
  background-image: url(../../_common/img/back-pattern.png), url(../img/back-xx.png);
  @media screen and (width <= 735px){
    background-size: auto, 70%;
  }
}
/* // Layout
---------------------------------------------------------------------------------------------------- */
@media screen and (width >= 1400px){
  body {
    grid-template-columns: minmax(0, 1fr) minmax(auto, 1800px) minmax(0, 1fr);
  }
  header nav {
    max-width: 1800px;
  }
  article{
    max-width: 1760px;
    display: grid;
    grid-gap: 0 1.2rem;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    padding: 0 1.2rem;
    position: relative;
  }
  #area-name, #tags {
    grid-column: span 2;
  }
  .column-status{
    grid-row: span 2;
  }
  #area-battle {
    grid-row: span 1;
  }
  #free-note {
    grid-column: 1;
  }
  #enc-bonus {
    grid-column: 2;
    align-self: end;
  }
}
/* // Font
---------------------------------------------------------------------------------------------------- */
#history {
  font-family: "Kosugi","Arial",var(--base-font-family-jp);
}
#character-name,
.words {
  font-family: var(--base-font-family-min);
}
#character-name rt {
  font-family: Arial,var(--base-font-family-min);
}

/* // Area-Status
---------------------------------------------------------------------------------------------------- */
#area-status {
  min-height: 56.7rem;
  display: grid;
  grid-gap: var(--box-v-gap) var(--box-h-gap);
  grid-template-columns: 0.7fr 1.1fr 1.1fr 2.115fr;
  grid-template-rows: auto max-content max-content auto;
  grid-template-areas:
    "PER PER WKS IMG"
    "REN REN REN IMG"
    "EXP STT STT IMG"
    "LFP LFP LFP IMG"
  ;
  @media screen and (width <= 767px){
    min-height: 0%;
    grid-gap: .5rem;
    grid-template-columns: 0.6fr 0.8fr 1.5fr 2.1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "PER PER PER WKS"
      "REN REN REN IMG"
      "EXP STT STT IMG"
      "LFP LFP LFP IMG"
    ;
  }
  @media screen and (width <= 735px){
    grid-template-columns: 0.6fr 2.4fr 2fr;
    grid-template-areas:
      "PER PER IMG"
      "WKS WKS IMG"
      "REN REN IMG"
      "EXP STT IMG"
      "LFP LFP LFP"
    ;
  }
  #image-none,
  #image      { grid-area: IMG; }
  #personal   { grid-area: PER; }
  #sub-status { grid-area: STT; }
  #works-cover{ grid-area: WKS; }
  #renegade   { grid-area: REN; }
  #exp        { grid-area: EXP; }
  #lifepath   { grid-area: LFP; }
}

#area-status dd:empty::before,
#area-status td:empty::before {
  content: '　';
}

:is(#personal, #works-cover) dl {
  display: grid;
  grid-template-rows: max-content 1fr;
  > dd {
    min-width: 0;
    line-height: 1;
    align-self: center;
    word-break: auto-phrase;
    overflow-wrap: break-word;
  }
}

/* Image */

/* Personal */
#personal {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  
  > dl:nth-child(n+4) {
    border-top-width: 1px;
  }
  > dl:not(:nth-child(3n+1)) {
    border-left-width: 1px;
    border-left-style: dotted;
  }
}

/* Works */
#works-cover {
  display: grid;
  grid-template-columns: 1fr;

  > dl:last-child {
    border-top-width: 1px;
  }
}


/* Renegade */
#renegade {
  display: grid;
  grid-template-columns: 0.8fr 3fr;

  > dl:last-child {
    border-left-width: 1px;
    border-left-style: dotted;
  }
  > dl dd {
    font-family: var(--font-proportional);
    font-feature-settings: "palt";
    min-height: 1.8em;
  }
}
#breed {
  display: grid;
  grid-template-columns: 1fr;
}
#syndrome {
  display: grid;
  grid-gap: 0 .8em;
  grid-template-columns: 1fr 1fr 1fr;
  > dt:last-of-type {
    grid-column: 3;
    font-size: 85%;
    line-height: calc(1.5 / .85);
  }
  > dd {
    grid-row: 2;
    white-space: nowrap;
  }
}
@media (width <= 860px), (1400px <= width <= 1680px) {
  #renegade {
    grid-template-columns: 5em auto;
  }
  #breed dd span.shorten {
    display: none;
  }
  #syndrome dd {
    font-size: 0.9em;
    transform: scaleY(calc(1/0.9));
  }
}
@media screen and (width <= 735px){
  #renegade {
    grid-template-columns: 1fr;
  }
  #renegade dl:last-child {
    border-width: 1px 0 0;
  }
  #breed dd span {
    display: inline;
  }
}

/* Sub-Status */
#sub-status {
  display: flex;
  flex-wrap: wrap;
  white-space:nowrap;
  #max-hp     { flex-basis: 33.3%; }
  #stock-pt   { flex-basis: 33.3%; }
  #saving     { flex-basis: 33.3%; }
  #initiative { flex-basis: 25%; }
  #move       { flex-basis: 25%; }
  #dash       { flex-basis: 25%; }
  #magic-dice { flex-basis: 25%; }
}
#sub-status dl {
  flex-grow: 1;
  margin: -1px 0 0 -1px;
  border-top-width: 1px;
  border-top-style: solid;
  border-left-width: 1px;
  border-left-style: dotted;
  > dd b {
    display: inline-block;
    font-weight: normal;
    margin-left: .5rem;
    transform: scale(1.3) translateY(-.1rem);
  }
}
@media screen and (1400px <= width <= 1550px){
  #sub-status dl span.shorten {
    font-size: 85%;
  }
}
@media screen and (1400px <= width <= 1450px){
  #sub-status dl span.shorten {
    display: none;
  }
}
@media screen and (width <= 767px){
  #sub-status dl span.shorten {
    font-size: 85%;
  }
}
@media screen and (width <= 735px){
  #sub-status dl span.shorten {
    display: none;
  }
}

/* EXP */
#exp {
  display: grid;
  grid-template-rows: max-content max-content 1fr;
}
#exp dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: end;;
  margin: -5px 5px 0;
  line-height: 1;
  white-space: nowrap;
  > * {
    border-width: 0 0 .1rem;
    border-style: solid;
  }
  > dt {
    grid-column: 1;
    font-size: 80%;
    padding: 0 0 3px;
  }
  > dd {
    grid-column: 2;
    text-align: right;
    font-size: 120%;
    padding: 2px 0 1px;
  }
}
#exp .create-type {
  padding: 0 2px;
  font-size: 80%;
  line-height: 1;
  font-family: var(--font-proportional);
  text-align: center;
  align-self: center;
  
  article.forbidden & {
    display: none;
  }
}
@media screen and (width <= 735px){
  #exp dl {
    margin: -5px 2px 0;
  }
  #exp span.shorten {
    display: none;
  }
}

/* Lifepath */
#lifepath {
  align-self: end;
}
#lifepath table {
  width: 100%;
  border-style: solid hidden hidden;
  empty-cells: hide;
  > colgroup {
    col:nth-child(1) { width: 6.2em; }
    col:nth-child(2) { width: 2.8em; }
    col:nth-child(3) { width: auto; }
  }
  & th.small,
  & th.left {
    border-width: 1px;
    border-style: solid dotted hidden;
  }
  & th.left {
    padding: .3rem 0 0 .3rem;
    line-height: 1;
  }
  & th.right {
    padding-right: .2rem;
    font-size: 93%;
  }
  & th.right.small {
    font-size: 87%;
  }
  & td {
    border-width: 1px;
    border-style: solid dotted;
  }
  & td:first-child {
    font-family: var(--font-proportional);
    font-feature-settings: "palt";
  }
  & td.center {
    width: 2.2em;
    font-size: 110%;
    line-height: calc(1.4 / 1.1);
  }
  & td.center.bold {
    font-size: 130%;
    font-weight: normal;
  }
  & td.comment {
    padding: .1rem 0 .1rem .3rem;
    line-height: 1.4;
    font-size: 93%;
  }
  & tr.urge th {
    padding-top: .2rem;
    font-size: 87%;
  }
}


/* // Status / Skills
---------------------------------------------------------------------------------------------------- */
#status {
  margin-top: var(--box-v-gap);
}
#status table {
  width: 100%;
  table-layout: fixed;
}
#status table thead {
  border-width: 0 0 1px;
  border-style: solid;
  border-right: hidden;
  & td {
    width: 2.8em;
    border-width: 1px;
    border-style: solid;
    font-size: 130%;
  }
  > tr.breakdown {
    display: none;
    > th {
      border-top-width: 1px;
      border-top-style: solid;
      font-weight: normal;
      font-size: 90%;
    }
    > td {
      font-weight: normal;
      font-size: 100%;
    }
  }
}
#status table tbody {
  border-style: none hidden hidden;
  font-family: var(--font-proportional);
  font-feature-settings: "palt";
  & td {
    border-width: 1px 0px;
    border-style: solid;
  }
  & td.left {
    padding-left: .5em;
  }
  & td.right {
    padding-right: .1rem;
    border-right-width: 1px;
    font-size: 120%;
    white-space: nowrap;
  }
  & td.right span.small {
    display: inline-block;
    margin: 0 -.3em 0 -1em;
    font-size: 70%;
    transform: scaleX(0.8);
  }
  & td.right::after {
    content: 'Lv';
    margin-left: .1em;
    font-size: 70%;
  }
  & td.left:empty + td.right:empty::after {
    content: '';
  }
}
@media screen and (width <= 735px){
  #status table thead td {
    width: 2.2em;
  }
  #status table tbody {
    font-size: 90%;
    & td.left {
      font-size: 90%;
    }
    & td.right {
      padding-right: .15em;
      font-size: 1.3em;
    }
    & td.right::after {
      display: none;
    }
  }
}

/* // Lois / Memory
---------------------------------------------------------------------------------------------------- */
#lois,
#memory,
#insanity {
  margin-top: var(--box-v-gap);
}
#lois table,
#memory table {
  width: 100%;
  > colgroup {
    .relation{ width: 6.2em; } /* 関係 */
    .name    { width:  14em; } /* 名前 */
    .emo     { width: 4.8em; } /* 感情 */
    .slash   { width: 1.2em; }
    .color   { width:   2em; } /* 属性 */
    .comment { width:  auto; } /* 備考 */
    .state   { width:   3em; } /* 状態 */
  }
  > thead {
    & th {
      padding-left: .5rem;
      text-align: left;
      vertical-align: bottom;
    }
    & th.color { padding-left: 0; }
    & th.right { padding-right: .3rem; }
  }
  > tbody {
    font-family: var(--font-proportional);
    font-feature-settings: "palt";
    & tr {
      border-width: 1px 0 0;
      border-style: solid;
    }
  }
}
@media screen and (width <= 735px){
  #lois table {
    > colgroup {
      font-size: 90%;
      .relation{ width: 5.2em; } /* 関係 */
      .name    { width:  10em; } /* 名前 */
    }
    > tbody {
      font-size: 90%;
      & td.comment { font-size: 90%; }
    }
  }
}
@media screen and (1400px <= width <= 1680px) {
  #lois table {
    > colgroup {
      .name    { width:  12em; } /* 名前 */
    }
    > tbody {
      & td.comment { font-size: 90%; }
    }
  }
}
#lois table tbody td.emo {
  text-align: left;

  &::before {
    content: "\e5ca";
    display: inline-grid;
    place-items: center;
    width: 1em;
    height: 1em;
    margin: 0 1px;
    border-radius: .3rem;
    line-height: 1;
    font-size: 1.3em;
    vertical-align: top;
    background-color: var(--bg-color);
    box-shadow: var(--box-inside-border-color) inset 0 0 1px 1px;
    color: transparent;
    font-family: "Material Symbols Outlined";
    font-weight: bold;
  }
  &.empty:not(.checked):empty::before {
    content: none;
  }
  &.checked::before {
    color: inherit;
  }
  + td:has(+ td.emo) { /* "／" */
    border-style: solid hidden;
  }
}
#lois table tbody td.state {
  border-left: hidden;
}
#lois table tbody td span[data-state] {
  display: inline-block;
  width: calc(100% - 2px);
  margin: 1px;
  padding: 2px 0;
  border-width: 1px;
  border-style: solid;
  border-radius: .5rem;
  font-size: 73%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  position: relative;
  &::after {
    content: attr(data-state);
    display: inline-block;
    transform: scaleY(1.2);
  }
  &[data-state="ロイス"]  { background: hsla(120,100%,50%,0.05); }
  &[data-state="タイタス"]{ background: hsla(200,100%,50%,0.3); font-weight: bold; }
  &[data-state="昇華"]    { background: hsla( 50,100%,50%,0.3); font-weight: bold; }
}
#lois table tbody td.sperior span[data-state] {
  padding-left: calc(1em + 2px);
  &::before {
    content: "S";
    position: absolute;
    inset: 0 auto 0 0;
    display: grid;
    place-items: center;
    transform: scale(1.2);
    width: 1em;
    font-weight: bold;
  }
  &[data-state="ロイス"]  { background: linear-gradient(to right,hsla(0,100%,50%,0.3) 1.1em, hsla(120,100%,50%,0.05) 1.1em); }
  &[data-state="タイタス"]{ background: linear-gradient(to right,hsla(0,100%,50%,0.3) 1.1em, hsla(200,100%,50%,0.3 ) 1.1em); }
  &[data-state="昇華"]    { background: linear-gradient(to right,hsla(0,100%,50%,0.3) 1.1em, hsla( 50,100%,50%,0.3 ) 1.1em); }
}
#lois table:not(:has(td.color:not(:empty))) .color {
  display: none;
}
#lois table:not(:has(td.state:not(:empty))) thead th.state > .text {
  display: none;
}

@media screen and (width <= 735px){
  #memory table {
    > colgroup {
      font-size: 90%;
      .relation{ width: 6.2em; } /* 関係 */
      .name    { width:  14em; } /* 名前 */
      .emo     { width: 4.5em; } /* 名前 */
    }
    > tbody {
      font-size: 90%;
      & td.comment { font-size: 90%; }
    }
  }
}

#insanity dl {
  display: grid;
  grid-template-columns: 10em auto;
  border-width: 1px 0 0;
  border-style: solid;
  > dt {
    padding: .2em 0;
    border-width: 0 1px 0 0;
    border-style: dotted;
    text-align: center;
  }
  > dd {
    padding: .2em .5em;
    text-align: left;
  }
}


/* // Area-Battle
---------------------------------------------------------------------------------------------------- */
#area-battle {
  position: relative;
}
@media screen and (width >= 1400px){
  #area-battle {
    margin-top: calc(-1 * var(--box-v-gap));
  }
}
#area-battle > .box {
  margin-top: var(--box-v-gap);
}
#area-battle > .box > table {
  width: 100%;
  border-style: hidden;
}
#area-battle > .box > table tbody tr {
  border-width: 1px 0 0;
  border-style: solid;
}
#area-battle > .box > table tbody td {
  border-left-width: 1px;
  border-style: dotted;
}

/* Effects */
#effect {
  position: relative;
}
#effect table thead th {
  vertical-align: bottom;
}
#effect table thead th:nth-child(n+4) {
  font-size: 90%;
}
@media screen {
  #effect table thead th {
    &:nth-child(1) { width: 2.1em; } /* No. */
    &:nth-child(2) { width:  auto; } /* 名称 */
    &:nth-child(3) { width:   2em; } /* LV */
    &:nth-child(4) { width: 8.4em; } /* タイミング */
    &:nth-child(5) { width: 7.0em; } /* 技能 */
    &:nth-child(6) { width: 3.8em; } /* 難易度 */
    &:nth-child(7) { width: 5.8em; } /* 対象 */
    &:nth-child(8) { width: 4.8em; } /* 射程 */
    &:nth-child(9) { width: 3.4em; } /* 侵蝕値 */
    &:nth-child(10){ width: 4.9em; } /* 制限 */
  }
}

#effect table tbody td:nth-child(n+2) {
  font-family: var(--font-proportional);
  font-feature-settings: "palt";
}
#effect table tbody td {
  &:nth-child(1) {  } /* No. */
  &:nth-child(2) { font-weight: bold; } /* 名称 */
  &:nth-child(3) {  } /* LV */
  &:nth-child(4) { font-size: 90%; } /* タイミング */
  &:nth-child(5) { font-size: 90%; } /* 技能 */
  &:nth-child(6) { font-size: 90%; } /* 難易度 */
  &:nth-child(7) { font-size: 90%; } /* 対象 */
  &:nth-child(8) { font-size: 90%; } /* 射程 */
  &:nth-child(9) {  } /* 侵蝕値 */
  &:nth-child(10){ font-size: 90%; } /* 制限 */
}

#effect table tbody td.note {
  padding-left: .5rem;
  display: none;
}
@media screen {
  #effect table tbody:hover td.note {
    display: table-cell;
  }
}
#effect[data-full-open="true"] table tbody td.note {
  display: table-cell;
}
#effect table tbody td.note span.right {
  float: right;
  font-size: 90%;
}
#effect tbody tr td:nth-child(9) span.thinest.small {
  transform: scaleY(calc(1/0.8)) translateY(-.1rem);
  font-size: 70%;
}
.ef-auto {
  display: block;
  transform: scaleY(calc(1/0.66));
  font-size: 0.66em;
  font-style: normal;
  font-weight: bold;
  line-height: 1;
  color: hsl(200,30%,50%);
  white-space: nowrap;
}
.ef-auto::before {
  content: '自動';
}
.ef-dlois {
  display: block;
  margin: -1.5em;
  transform: scale(0.5);
  font-style: normal;
  font-weight: bold;
  line-height: 1;
  color: hsl(0,30%,50%);
}
.ef-dlois::before {
  content: 'D';
  display: block;
  transform: scale(1.1,0.9) translateY(.1em);
  font-size: 3em;
}
.ef-dlois::after {
  display: block;
  content: 'ロイス';
  white-space: nowrap;
  transform: translateY(-.1em);
}
.ef-easy {
  display: block;
  margin: -1em;
  transform: scale(0.8, 0.7) translateY(.25em);
  font-style: normal;
  font-weight: bold;
  line-height: 1;
  color: hsl(100,30%,50%);
}
.ef-easy::before {
  content: 'EA';
  display: block;
}
.ef-easy::after {
  content: 'SY';
  display: block;
}
.ef-enemy {
  display: block;
  margin: -1.5em;
  transform: scale(0.5);
  font-style: normal;
  font-weight: bold;
  line-height: 1;
  color: hsl(270,30%,50%);
}
.ef-enemy::before {
  content: 'E';
  display: block;
  transform: scale(1.1,0.9) translateY(.1em);
  font-size: 3em;
}
.ef-enemy::after {
  display: block;
  content: 'NEMY';
  white-space: nowrap;
  transform: translateY(-.1em);
}
.ef-other::before {
  content: '他';
  color: hsl(0,0%,50%);
  font-size: 1em;
  font-style: normal;
  font-weight: bold;
}
@media all and (width > 735px){
  #effect:not([data-full-open="true"]) table > tbody:last-child:not(:hover) > tr:last-child {
    border-top: none;
  }
}
@media screen and (width <= 735px){
  #effect table thead tr,
  #effect table tbody tr {
    display: grid;
    grid-template-columns: 2.1em 2em 6em auto 4em 5.5em 3em 3em 4.9em;
    border-width: 0 0 1px;
  }
  #effect table tbody tr:last-child { border: 0; }
  #effect table thead th:nth-child(n) {
    width: auto;
  }
  #effect table thead th:nth-child(2) {
    display: none;
  }
  #effect table tbody td[rowspan] {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #effect table tbody td {
    font-size: 100% !important;
    border-width: 0 0 0 1px;
    border-style: dotted;
  }
  #effect table tbody td.name {
    grid-row: 1; grid-column: 1 / span 9;
    text-align: left;
    padding-left: .5rem;
    border-width: 0 0 1px;
    border-style: solid;
  }
  #effect table tbody td.note {
    grid-row: 1; grid-column: 1 / span 9;
    border-width: 1px 0 0;
    border-style: solid;
  }
  #effect table tbody td:first-child { border-left: 0; }
  #effect table tbody td:last-child  { border-right: 0; }
  #effect table tbody td span.shorten {
    display: none !important;
  }
  #effect table tbody td span.thin,
  #effect table tbody td span.thiner,
  #effect table tbody td span.thinest {
    transform: scaleY(calc(1/0.9)) !important;
    font-size: 90% !important;
  }
  .ef-dlois {
    margin: -1.5em;
  }
}

#magic table {
  > colgroup {
    .name { width:  16em; } /* 名称 */
    .type { width: 4.5em; } /* 種別 */
    .exp  { width: 3.5em; } /* 経験点 */
    .act  { width: 5.5em; } /* 発動値 */
    .enc  { width: 3.4em; } /* 侵蝕値 */
    .note { width:  auto; } /* 効果 */
  }
  > thead th {
    font-size: 90%;
  }
  > tbody td:nth-child(1) { font-weight: bold; } /* 名称 */
  > tbody td.note { padding-left: .5rem; }
}


/* Combos */
#combo .combo-table {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr 2fr;
  grid-template-rows: max-content max-content 1fr;
  grid-template-areas:
    "NAME COMB COMB"
    "  IN   IN  OUT"
    "NOTE NOTE  OUT"
  ;
  border-top-width: 1px;
  border-top-style: solid;
  text-align: center;

  @media print {
    break-inside: avoid;
  }
  
  &:nth-of-type(even) {
    background: var(--box-even-rows-bg-color);
  }
  > h3 { grid-area: NAME; }
  > .combo-combo { grid-area: COMB; }
  > .combo-in    { grid-area:   IN; }
  > .combo-out   { grid-area:  OUT; }
  > .combo-note  { grid-area: NOTE; }
}
#combo .combo-table h3 {
  display: grid;
  place-items: center;
  margin: 0;
  border-width: 0 0 1px;
  border-style: solid;
  background: none;
  font-family: var(--font-proportional);
  word-break: auto-phrase;
  overflow-wrap: break-word;
}
#combo .combo-table dl {
  > dt {
    padding: .2rem 0 .1rem;
    font-size: 80%;
    white-space: nowrap;
  }
  > dd {
    font-size: 90%;
    padding: .1em 0;
    border-top-width: 1px;
    border-top-style: solid;
  }
  > dd:empty {
    padding: 0;
  }
}
#combo .combo-table .combo-combo {
  border-width: 0 0 1px 1px;
  border-style: solid;

  & dt {
    padding-left: .3em;
    text-align: left;
  }
  & dd {
    text-align: left;
    padding-left: .5em;
  }
  & dd span:empty::before {
    content: "";
    display: inline-block;
  }
}
#combo .combo-table .combo-in {
  display: flex;
  border-width: 0 1px 0 0;
  border-style: solid;
}
#combo .combo-table .combo-in dl {
  flex-grow: 1;
  display: grid;
  grid-template-rows: max-content auto;
  
  &:nth-child(1) { flex-basis: auto; }
  &:nth-child(2) { flex-basis: 15%; }
  &:nth-child(3) { flex-basis: 3.5em; }
  &:nth-child(4) { flex-basis: 6em; }
  &:nth-child(5) { flex-basis: 4em; }
  &:nth-child(6) { flex-basis: 3em; flex-shrink: 1; flex-grow: 0; }
  
  & dd {
    display: grid;
    place-items: center;
  }
  & + dl dd {
    border-left-width: 1px;
    border-left-style: dotted;
  }
}
#combo .combo-table .combo-out {
  display: grid;
  grid-template-columns: auto auto auto auto auto;
  grid-template-rows: max-content auto;
  
  .combo-cond  { grid-column: 1; }
  .combo-dice  { grid-column: 2; }
  .combo-crit  { grid-column: 3; }
  .combo-fixed { grid-column: 4; }
  .combo-atk   { grid-column: 5; }
  
  & dd.combo-dice  ,
  & dd.combo-crit  ,
  & dd.combo-fixed ,
  & dd.combo-atk   { font-size: 1.2em; }
  & > dd:not(.combo-cond) {
    border-left-width: 1px;
    border-left-style: dotted;
  }
  & dd {
    display: grid;
    place-items: center;
  }
  & dd.combo-cond  {
    font-size: 80%;
  }
}
#combo .combo-table .combo-note {
  margin: 0;
  padding: .2em .5em;
  border-width: 1px 1px 0 0;
  border-style: solid;
  text-align: left;
  line-height: 1.4;

  &:empty {
    display: unset;
  }
}

#combo .combo-table .combo-combo dd span.thin {
  display: inline-block;
  font-size: 90%;
  transform: scaleY(calc(1/0.9));
  text-decoration: inherit;
}
#combo .combo-table .combo-in dd span {
  display: inline-block;
  
  &.thin          { transform: scaleY(calc(1/0.93)); font-size: 93%; }
  &.thiner        { transform: scaleY(calc(1/0.86)); font-size: 86%; }
  &.thinest       { transform: scaleY(calc(1/0.8));  font-size: 79%; }
  &.thinest.small { transform: scaleY(calc(1/0.8));  font-size: 73%; }
}

@media screen and (width <= 735px){
  #combo .combo-table {
    grid-template-columns: 11fr;
    grid-template-areas:
      "NAME"
      "COMB"
      "  IN"
      " OUT"
      "NOTE"
    ;
    border-top-width: 1px;
    border-top-style: solid;
    text-align: center;
  }
  #combo .combo-table h3 {
    display: block;
    padding: .5rem .2em;
    text-align: left;
    border: 0;
  }
  #combo .combo-table dl dd {
    font-size: inherit;
  }
  #combo .combo-table .combo-combo {
    display: grid;
    grid-template-columns: max-content 1fr;
    border-width: 1px 0;
    border-style: solid;
    > dt {
      padding-left :.5em;
      padding-right:.5em;
    }
    > dd {
      padding-left: .2em;
      border-width: 0 0 0 1px;
      border-style: dotted;
    }
  }
  #combo .combo-table .combo-in {
    margin: .5rem 0;
    border-width: 0 0 1px;
    border-style: solid;
  }
  #combo .combo-table .combo-out {
    border-width: 0 0 1px;
    border-style: solid;
  }
  #combo .combo-table .combo-note {
    margin: .5rem 0;
    border-width: 0;
    border-style: solid;
  }
  #combo .shorten {
    display: none !important;
  }
}

#combo[data-display-mode="simple"] .combo-table {
  & h3 {
    border-bottom: none;
  }
  & .combo-combo {
    display: grid;
    align-items: center;
    border-bottom: none;
  }
  & .combo-combo > dd {
    border-top: none;
  }
  & .combo-combo > dt,
  & .combo-in ,
  & .combo-out,
  & .combo-note {
    display: none;
  }
}
@media screen and (width <= 735px){
  #combo[data-display-mode="simple"] .combo-table .combo-combo {
    display: block;
  }
}
/* Items */
#items {
  margin-top: var(--box-v-gap);
}
#items table {
  border-width: 0 0 1px;
  border-style: solid hidden !important;
}
#items .box:last-child table {
  border-bottom-style: hidden !important;
}
#items table thead th {
  height: 2em;
  vertical-align: bottom;

  &:nth-child(n+2) {
    font-size: 90%;
  }
  &:nth-child(1) { width:  12em; } /* 名称 */
  &:nth-child(2) { width: 3.4em; } /* 常備化 */
  &:nth-child(3) { width: 3.4em; } /* 経験点 */
  &:nth-child(4) { width: 5.5em; } /* 種別 */
  &:nth-child(5) { width: 5.9em; } /* 技能 */
  &:nth-child(6) { width: 3.4em; } /* 命中  ／ドッジ */
  &:nth-child(7) { width: 3.9em; } /* 攻撃力／行動 */
  &:nth-child(8) { width: 3.4em; } /* ガード／装甲値 */
  &:nth-child(9) { width: 3.4em; } /* 射程 */
  &:last-child   { width: auto; text-align: left; padding-left: 1em; } /* 解説 */
}

#items table tbody td {
  font-family: var(--font-proportional);
  font-feature-settings: "palt";
  
  &:nth-child(1) {  } /* 名称 */
  &:nth-child(2) {  } /* 常備化 */
  &:nth-child(3) {  } /* 経験点 */
  &:nth-child(4) { font-size: 90%; } /* 種別 */
  &:nth-child(5) { font-size: 90%; } /* 技能 */
  &.range  { font-size: 90%; } /* 射程 */
  & span.handle {
    display: block;
    width: 2em;
  }
  & span.handle::before {
    content: ':::';
  }
  &.note {
    font-size: 90%;
  }
}
@media screen and (width <= 735px){
  #items table { font-size: 90%; }
  #items table thead th {
    &:nth-child(1) { width:   8em; } /* 名称 */
    &:nth-child(2) { width: 3.4em; } /* 常備化 */
    &:nth-child(3) { width: 3.4em; } /* 経験点 */
    &:nth-child(4) { width: 5.5em; } /* 種別 */
    &:nth-child(5) { width: 5.9em; } /* 技能 */
    &:nth-child(6) { width: 3.4em; } /* 命中  ／ドッジ */
    &:nth-child(7) { width: 3.4em; } /* 攻撃力／行動 */
    &:nth-child(8) { width: 3.4em; } /* ガード／装甲値 */
    &:nth-child(9) { width: 3.4em; } /* 射程 */
    &:last-child   { width: auto; } /* 解説 */
  }
}

/* Exps */
#exps h2:not(:first-child) {
  margin-top: 0;
}
#exps thead {
  word-break: keep-all;
  font-size: 83%;
  vertical-align: bottom;
}
@media screen and (width <= 735px){
  #exps table {
    margin-top: -1em;
  }
}

/* Encroach-Bonus
---------------------------------------------------------------------------------------------------- */
#enc-bonus {
  position: sticky;
  bottom: 0;
  margin-top: var(--box-v-gap);
  background-image: none;
  background-color: var(--bg-color);
  border-radius: 5px;
}
#enc-bonus details:not([open]) summary::after {
  content: '（クリックで展開）';
  font-size: 90%;
}
#enc-bonus p {
  margin: -1.4em 0 0 9em;
}
#enc-bonus p input {
  &#current-encroach {
    width: 4em;
    padding: .1em;
    text-align: center;
    vertical-align: text-bottom;
    font-size: 110%;
    font-weight: bold;
  }
  &[type="checkbox"] {
    margin: 0 .4rem 0 1em;
    transform: scale(1.4);
  }
  &[type="checkbox"] + label {
    display: inline-block;
    user-select: none;
    cursor: pointer;
  }
  &[type="checkbox"]:not(:checked) + label {
    opacity: 0.5;
  }
  &[type="checkbox"] + label:hover {
    opacity: 0.8;
  }
}
#enc-bonus table {
  border-top: 1px;
  border-bottom: hidden;

  & col.current {
    background-color: hsla(340,100%,50%,0.3);
  }
  & th {
    font-size: 80%;
    line-height: 1;
    padding: .2rem;
  }
  & td {
    padding: .2rem 0 .1rem;
    line-height: 1;
  }
}

@media screen and (width <= 735px){
  #enc-bonus p {
    margin: 0 0 0 1em;
  }
  #enc-bonus p input#current-encroach {
    font-size: 150%;
  }
}

[data-edb] {
  position: relative;
}
[data-edb]:not(:empty):not([data-edb="0"]):not([data-edb=""]) {
  padding-right: .5em !important;
}
[data-edb]:not(:empty):not([data-edb="0"]):not([data-edb=""])::after {
  content: '+'attr(data-edb);
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 75%;
  line-height: 0.8;
  color: #b00;
}

/* // Free-Memo
---------------------------------------------------------------------------------------------------- */
#free-note,
#free-history{
  margin-top: var(--box-v-gap);
}


/* // History
---------------------------------------------------------------------------------------------------- */
#history {
  margin-top: var(--box-v-gap);
}
#history table {
  > thead {
    .exp    { width: 4.6em; } /* 経験点 */
  }
  > tbody td.exp s {
    opacity: 0.3;
    text-decoration: none;
  }
}

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