@charset "UTF-8";
:root {
  font-size: 20px;
}

@media (max-width: 1112px) {
  :root {
    font-size: 1.7985611511vw;
  }
}
@media print {
  :root {
    font-size: 70%;
  }
}
.c-evidence-uploader {
  display: grid;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}
.c-evidence-uploader form {
  position: relative;
  display: grid;
  grid-row-gap: 1rem;
  background: white;
  padding: 1rem;
  border-radius: 0.2rem;
  font-family: sans-serif;
}
.c-evidence-uploader form *[type=file] {
  all: unset;
  font-size: 0.8rem;
}
.c-evidence-uploader form fieldset {
  all: unset;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 0.8rem;
}
.c-evidence-uploader form fieldset legend {
  font-size: 0.6rem;
  margin-bottom: 0.5em;
}
.c-evidence-uploader form fieldset input {
  all: unset;
  display: grid;
  padding: 0 1em;
  color: black;
  font-family: inherit;
  font-size: inherit;
  text-align: right;
}
.c-evidence-uploader form fieldset input[name=year] {
  width: 4em;
}
.c-evidence-uploader form fieldset input[name=month], .c-evidence-uploader form fieldset input[name=date] {
  width: 2em;
}
.c-evidence-uploader form .close {
  all: unset;
  position: absolute;
  right: 0;
  bottom: 100%;
  color: white;
  font-size: 180%;
  cursor: pointer;
}
.c-evidence-uploader form .submit {
  all: unset;
  display: grid;
  align-items: center;
  justify-content: center;
  height: 3em;
  background: #333;
  border-radius: 0.1rem;
  color: white;
  font-family: inherit;
  font-size: 0.8rem;
}

#view {
  display: grid;
  grid-template-rows: max-content 1fr;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: #f5f5f5;
  font-family: -apple-system;
  font-size: 75%;
}
#view.loading::before {
  content: "";
  display: block;
  position: absolute;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
}
@media print {
  #view {
    position: static;
    width: auto;
    height: auto;
    background: none;
    font-family: serif;
    font-size: inherit;
  }
}
#view #menu {
  display: grid;
  grid-gap: 0.5em;
  padding: 0.5em;
  justify-items: start;
  background-color: black;
}
#view #menu .year a.current, #view #menu[data-mode=journal] .mode a.journal, #view #menu[data-mode=cash] .mode a.cash, #view #menu[data-mode=bank] .mode a.bank, #view #menu[data-mode=total] .mode a.total, #view #menu[data-mode=receivable] .mode a.receivable, #view #menu[data-month="1"] .month a:nth-of-type(1), #view #menu[data-month="2"] .month a:nth-of-type(2), #view #menu[data-month="3"] .month a:nth-of-type(3), #view #menu[data-month="4"] .month a:nth-of-type(4), #view #menu[data-month="5"] .month a:nth-of-type(5), #view #menu[data-month="6"] .month a:nth-of-type(6), #view #menu[data-month="7"] .month a:nth-of-type(7), #view #menu[data-month="8"] .month a:nth-of-type(8), #view #menu[data-month="9"] .month a:nth-of-type(9), #view #menu[data-month="10"] .month a:nth-of-type(10), #view #menu[data-month="11"] .month a:nth-of-type(11), #view #menu[data-month="12"] .month a:nth-of-type(12) {
  background-color: white;
  color: black;
}
#view #menu > div {
  display: grid;
  grid-gap: 0.25em;
  grid-auto-flow: column;
}
#view #menu > div a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2em;
  border-radius: 0.1em;
  padding: 0 0.75em;
  background-color: #666;
  color: white;
  text-decoration: none;
}
#view #menu > div hr {
  border: none;
  margin: 0;
}
@media print {
  #view #menu {
    display: none;
  }
}
#view #main {
  display: grid;
  grid-template-rows: 1fr max-content;
  overflow: auto;
}
#view #main #table {
  display: grid;
  grid-gap: 2em;
  align-content: start;
  justify-items: start;
  overflow: auto;
  padding: 1em;
}
@media print {
  #view #main #table {
    grid-gap: 0;
    padding: 1px;
  }
  #view #main #table::before {
    display: block;
    margin-bottom: 1em;
    font-size: 180%;
    letter-spacing: 0.25em;
  }
  #view #main[data-mode=journal] #table::before {
    content: "仕訳帳";
  }
  #view #main[data-mode=cash] #table::before {
    content: "現金出納帳";
  }
  #view #main[data-mode=bank] #table::before {
    content: "預金出納帳";
  }
  #view #main[data-mode=total] #table::before {
    content: "月別総括集計表";
  }
}
#view #main #table table {
  border: solid #999;
  border-width: 0 1px 1px 0;
  border-collapse: collapse;
  border-spacing: 0;
  background-color: white;
}
#view #main #table table th,
#view #main #table table td {
  border: solid #999;
  border-width: 1px 0 0 1px;
  padding: 0.5em 1em;
}
#view #main #table table th {
  background-color: #ddd;
  font-weight: normal;
}
#view #main #table table td.amount, #view #main #table table td.in, #view #main #table table td.out, #view #main #table table td.balance {
  text-align: right;
}
#view #main #table table td.amount:after, #view #main #table table td.in:after, #view #main #table table td.out:after, #view #main #table table td.balance:after {
  content: "円";
}
#view #main #table table td.amount:empty:after, #view #main #table table td.in:empty:after, #view #main #table table td.out:empty:after, #view #main #table table td.balance:empty:after {
  content: none;
  content: "\a";
  white-space: pre;
}
#view #main #table table tbody tr.record {
  cursor: pointer;
}
#view #main #table table tbody tr.record:hover td:not(.month) {
  background-color: #eee;
}
#view #main #table table tbody tr.record.selected td:not(.month) {
  background-color: yellow;
}
#view #main #table table tbody tr td {
  vertical-align: top;
}
#view #main #table table tbody tr td.month, #view #main #table table tbody tr td.date {
  text-align: right;
}
#view #main #table table tbody tr td.date span {
  display: inline-block;
  width: 2.5em;
  text-align: right;
}
#view #main #table table tbody tr td.date span.month:after {
  content: "月";
}
#view #main #table table tbody tr td.date span.date:after {
  content: "日";
}
#view #main #table table tbody tr td.number.active {
  color: blue;
  text-decoration: underline;
}
#view #main #table table tfoot {
  border-top: double #999;
  font-weight: bold;
}
#view #main #table table.total tbody th,
#view #main #table table.total tfoot th {
  text-align: left;
}
#view #main #table table.total th,
#view #main #table table.total td {
  white-space: nowrap;
}
#view #main #table table.total tr > *:nth-child(3) {
  border-left: double #999;
}
#view #main #table table.total tbody tr:nth-of-type(-n+3) th {
  text-align: left;
}
#view #main #table table.total tbody tr:nth-of-type(n+4) th {
  text-align: right;
  font-size: 85%;
  padding-left: 2em;
}
#view #main #table table.receivable {
  break-inside: avoid-page;
}
#view #main #table table.receivable:not(.selected) {
  display: none;
}
#view #main #table table.receivable caption {
  margin-bottom: 0.5em;
  font-size: 120%;
  text-align: left;
}
@media print {
  #view #main #table table,
  #view #main #table table th,
  #view #main #table table td {
    border-color: black;
    border-width: 0.5px;
  }
  #view #main #table table th,
  #view #main #table table td {
    padding: 0.4em 0.8em;
  }
  #view #main #table table th {
    background: none;
    font-weight: normal;
  }
  #view #main #table table tbody td {
    background: none !important;
  }
  #view #main #table table tbody td.category, #view #main #table table tbody td.debit, #view #main #table table tbody td.credit, #view #main #table table tbody td.number {
    white-space: nowrap;
  }
  #view #main #table table tfoot {
    border-top: 0.5px black;
    font-weight: normal;
  }
  #view #main #table table.balance {
    display: none;
  }
  #view #main #table table.total {
    font-size: 90%;
  }
  #view #main #table table.total tr > *:nth-child(3) {
    border-left: 0.5px black;
  }
  #view #main #table table.receivable:nth-of-type(n+2) {
    margin-top: 2em;
  }
}
#view #main #table .opponents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
}
@media print {
  #view #main #table .opponents {
    display: none;
  }
}
#view #main #table .opponents a {
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 0.25em;
  background: white;
  font-size: 85%;
  cursor: pointer;
}
#view #main #table .opponents a:not(.selected) {
  opacity: 0.5;
  background: transparent;
}
#view #main #edit {
  display: grid;
  grid-gap: 1.25em;
  position: relative;
  padding: 1.5em;
  padding-right: 2.5em;
  background-color: black;
}
@media print {
  #view #main #edit {
    display: none;
  }
}
#view #main #edit form {
  visibility: hidden;
  position: fixed;
}
#view #main #edit dl {
  display: grid;
  grid-template-columns: repeat(5, max-content) 1fr auto max-content;
  grid-auto-flow: column;
  grid-gap: 0.25em;
  overflow: auto;
  margin: 0;
}
#view #main #edit dl dt,
#view #main #edit dl dd {
  display: flex;
  align-items: center;
  justify-content: center;
}
#view #main #edit dl dt {
  grid-row: 1;
  height: 2em;
  background-color: #666;
  color: white;
  font-size: 85%;
}
#view #main #edit dl dd {
  grid-row: 2;
  gap: 0.25em;
  height: 3em;
  margin: 0;
  padding: 0 0.5em;
  background-color: white;
  color: #ccc;
  white-space: nowrap;
  font-size: 95%;
}
#view #main #edit dl dd.amount::after, #view #main #edit dl dd.tax::after {
  content: "円";
}
#view #main #edit dl dd.number {
  display: grid;
  grid-auto-flow: column;
  grid-column-gap: 0.5em;
  align-items: center;
}
#view #main #edit dl dd.number button {
  all: unset;
  display: grid;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  aspect-ratio: 1/1;
  background: #ccc;
  border-radius: 0.1rem;
  color: white;
  font-size: 1em;
  line-height: 0;
  cursor: pointer;
}
#view #main #edit dl dd input {
  appearance: none;
  outline: none;
  border: none;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: inherit;
}
#view #main #edit dl dd input[name=year] {
  width: 3em;
  text-align: right;
}
#view #main #edit dl dd input[name=month] {
  width: 1.5em;
  text-align: right;
}
#view #main #edit dl dd input[name=date] {
  width: 1.5em;
  text-align: right;
}
#view #main #edit dl dd input[name=amount] {
  text-align: right;
  font-size: 125%;
  width: 5em;
}
#view #main #edit dl dd input[name=tax] {
  text-align: right;
  font-size: 125%;
  width: 4em;
}
#view #main #edit dl dd input[name=opponent] {
  width: 10em;
}
#view #main #edit dl dd input[name=number] {
  width: 7em;
}
#view #main #edit dl dd select {
  appearance: none;
  outline: none;
  border: none;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: inherit;
}
#view #main #edit .addnew button {
  border: none;
  padding: 0.5em 1em;
  border-radius: 0.1em;
  background-color: #666;
  color: white;
  font-size: 150%;
  cursor: pointer;
}
#view #main #edit .addnew button:before {
  content: "＋ ";
}
#view #main #edit .btns {
  display: flex;
  gap: 1em;
}
#view #main #edit .btns button {
  display: flex;
  gap: 0.25em;
  align-items: center;
  height: 2.25em;
  border: none;
  border-radius: 0.1em;
  padding: 0 1em;
  margin: 0;
  background-color: #666;
  color: white;
  font-size: 120%;
  cursor: pointer;
}
#view #main #edit .btns button.copy:before {
  content: "＋";
}
#view #main #edit .btns button.delete {
  margin-left: auto;
}
#view #main #edit .btns button.delete:before {
  content: "×";
}
#view #main #edit .close {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 150%;
  padding: 0.5em;
  color: white;
  cursor: pointer;
}
