:root {
  --paper: #f3ecd9;
  --paper2: #e9dfc4;
  --ink: #1f2430;
  --faint: #8c8573;
  --red: #b3261e;
  --blue: #1f4e8c;
  --green: #2f6b3a;
  --desk: #2b2a26;
}
[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--desk);
  color: var(--ink);
  font-family: "Courier Prime", "Courier New", ui-monospace, monospace;
  font-size: 15px;
}
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}
#top {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 8px 16px;
  color: var(--paper);
  background: #1c1b18;
}
.brand {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 18px;
}
.brand span {
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.75;
  font-size: 14px;
}
#dayname {
  flex: 1;
  font-size: 16px;
}
#clock {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#coach {
  background: #fff6c9;
  border-bottom: 2px solid #c9b54a;
  padding: 10px 16px;
  font-size: 16px;
  line-height: 1.4;
  min-height: 48px;
}
#coach b {
  color: var(--red);
  margin-right: 8px;
}
#desk {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 12px;
  padding: 12px;
  min-height: 0;
}
#sheetwrap {
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 2px 10px #0007;
  min-height: 0;
  position: relative;
}
#sheet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
}
.card {
  background: var(--paper);
  border-radius: 3px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px #0006;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 3px;
}
#board {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.35;
}
#risk {
  margin: 6px 0 0;
  padding: 4px 8px;
  border: 2px dashed var(--red);
  color: var(--red);
  font-size: 13px;
  line-height: 1.3;
}
#orders {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.4;
}
#orders li {
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 2px;
}
#orders li.sel {
  background: #f7d9d4;
  outline: 2px solid var(--red);
}
#orders li.locked {
  color: var(--faint);
}
#orders li .st {
  font-weight: 700;
  color: var(--red);
}
#orders li.changed .st::after {
  content: " ✎";
}
.hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: #5b5546;
}
#ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#ledger td {
  padding: 1px 3px;
}
#ledger td.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#ledger tr.tot td {
  border-top: 1px solid var(--ink);
  font-weight: 700;
}
#ledger tr.par td {
  color: var(--green);
  font-weight: 700;
}
#sign {
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 10px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
#sign:disabled {
  background: #6d665a;
  cursor: default;
}
kbd {
  font: inherit;
  font-size: 0.85em;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0 4px;
}
#refusal {
  margin: 0;
  background: #fbe2df;
  color: var(--red);
  border-left: 4px solid var(--red);
  padding: 6px 8px;
  font-size: 14px;
  line-height: 1.35;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #000a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.sheetcard {
  background: var(--paper);
  max-width: 720px;
  width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  overflow-y: auto;
  padding: 22px 28px;
  border-radius: 3px;
  box-shadow: 0 6px 30px #000;
  line-height: 1.4;
}
.sheetcard h1 {
  margin: 0 0 6px;
  font-size: 40px;
  letter-spacing: 6px;
  color: var(--red);
}
.sheetcard h2 {
  margin: 0 0 8px;
  color: var(--red);
  letter-spacing: 2px;
}
.lede {
  font-size: 16px;
  margin: 0 0 12px;
}
.controls {
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 15px;
}
.controls th {
  text-align: left;
  padding: 2px 14px 2px 0;
  color: var(--red);
  white-space: nowrap;
}
.controls td {
  padding: 2px 0;
}
#days {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.dayb {
  border: 2px solid var(--ink);
  padding: 6px 10px;
  font-size: 14px;
  min-width: 150px;
}
.dayb.sel {
  background: #f7d9d4;
  border-color: var(--red);
}
.dayb.locked {
  opacity: 0.45;
}
.go {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 0;
}
.stars {
  color: #b8860b;
  font-size: 30px;
  letter-spacing: 4px;
}
.rv {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  margin: 8px 0;
}
.rv td,
.rv th {
  padding: 2px 6px;
  border-bottom: 1px solid var(--paper2);
  text-align: left;
}
.rv td.n,
.rv th.n {
  text-align: right;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 15px;
  z-index: 20;
  max-width: 80%;
}
#panel.form19 #orderscard {
  outline: 3px solid var(--red);
}
@media (max-height: 960px) and (min-width: 901px) {
  .card {
    padding: 6px 10px;
  }
  #panel {
    gap: 7px;
  }
  .hint {
    font-size: 12px;
  }
  #sign {
    padding: 7px;
  }
}
@media (max-width: 900px) {
  html,
  body {
    font-size: 13px;
  }
  #desk {
    grid-template-columns: 1fr 230px;
    gap: 6px;
    padding: 6px;
  }
  #boardcard,
  .hint {
    display: none;
  }
  .card {
    padding: 5px 8px;
  }
  #orders {
    font-size: 12px;
  }
  #ledger {
    font-size: 12px;
  }
  #top .brand span {
    display: none;
  }
  #coach {
    font-size: 13px;
    padding: 5px 10px;
    min-height: 0;
  }
  #sign {
    font-size: 13px;
    padding: 6px;
  }
}
