:root {
  color-scheme: light;
  --paper: #f5f1e6;
  --ink: #171511;
  --line: #26231d;
  --muted: #766f62;
  --soft: #e8e0d1;
  --field: #fffdf5;
  --due: #ffe2a8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: #cfc8ba;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.paper-stage {
  display: block;
}

.sheet-top {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  width: 990px;
  margin-bottom: 8px;
  background: #cfc8ba;
  padding-bottom: 8px;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
  font-size: 14px;
}

.weekday-date-display {
  min-height: 18px;
  font-size: 13px;
}

.date-field input {
  width: 180px;
  height: 32px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}

.current-reception {
  display: grid;
  gap: 2px;
  min-width: 150px;
  font-size: 12px;
  font-weight: 700;
}

.current-reception select {
  min-height: 30px;
  border: 1.35px solid var(--line);
  background: var(--field);
  padding: 4px 6px;
}

.system-button,
.extra-button {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  text-decoration: none;
  padding: 7px 12px;
  font-weight: 700;
  border-radius: 2px;
}

.system-buttons {
  display: flex;
  align-items: end;
  gap: 6px;
}

.system-button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.system-button:disabled {
  color: var(--muted);
  opacity: 0.45;
}

.sheet-wrap {
  position: relative;
  width: 990px;
  padding: 28px 30px 36px;
  background: var(--paper);
  box-shadow: 0 12px 35px rgb(0 0 0 / 18%);
}

.settlement-toggle-button {
  display: block;
  width: max-content;
  margin-top: 10px;
}

.reception-settlement-panel {
  width: 100%;
  margin-top: 8px;
  border: 1.35px solid var(--line);
  background: #f7f2e6;
  padding: 12px;
}

.settlement-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.settlement-panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.settlement-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settlement-status.is-live,
.settlement-status.is-final {
  color: var(--ink);
}

.settlement-status.is-pending {
  color: #8a4d00;
}

.settlement-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.settlement-entry-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 8px;
}

.settlement-entry-form[hidden] {
  display: none !important;
}

.settlement-entry-form strong,
.settlement-entry-form > div {
  grid-column: 1 / -1;
}

.settlement-entry-form label {
  display: grid;
  gap: 3px;
}

.settlement-entry-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.settlement-entry-form input {
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 4px 6px;
}

.reception-pay-entry {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 7px 8px;
}

.reception-pay-entry label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reception-pay-entry label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.reception-pay-entry input {
  min-height: 28px;
  width: 58px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 4px 6px;
  font-weight: 700;
  text-align: center;
}

.reception-pay-lines {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.9fr) minmax(120px, 0.8fr);
  gap: 6px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.reception-pay-lines strong {
  font-size: 17px;
  text-align: right;
}

.settlement-form-preview {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.settlement-handover {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 8px;
  font-size: 12px;
}

.settlement-handover strong {
  display: block;
  margin-bottom: 4px;
}

.settlement-handover .system-button {
  margin-top: 8px;
}

.settlement-formula-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr) auto minmax(104px, 1.2fr) auto minmax(70px, 1fr) auto minmax(70px, 1fr) auto minmax(122px, 1.35fr) auto minmax(78px, 1fr);
  gap: 5px;
  align-items: end;
  border: 1.35px solid var(--line);
  background: var(--field);
  padding: 8px;
}

.formula-term {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.formula-term span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.05;
}

.formula-term output {
  min-height: 22px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
}

.settlement-formula-row b {
  align-self: end;
  padding-bottom: 1px;
  font-size: 18px;
  line-height: 1;
}

.balance-term output {
  font-size: 20px;
}

.settlement-shift-count {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settlement-shift-count output {
  color: var(--ink);
}

.other-entry-panel {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.other-entry-actions {
  display: flex;
  gap: 6px;
}

.other-entry-form {
  display: grid;
  grid-template-columns: 90px 1fr max-content;
  gap: 6px;
  align-items: end;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 7px 8px;
}

.other-entry-form[hidden] {
  display: none !important;
}

.other-entry-form strong {
  align-self: center;
  font-size: 13px;
}

.other-linked-amount {
  align-self: center;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.other-entry-form label {
  display: grid;
  gap: 3px;
}

.other-entry-form label[hidden] {
  display: none !important;
}

.other-entry-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.other-entry-form input {
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 4px 6px;
}

.other-entry-form [data-other-entry-amount] {
  width: 82px;
}

.other-detail-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}

.other-detail-list {
  display: grid;
  gap: 4px;
  align-content: start;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.other-detail-list h4 {
  margin: 0;
  font-size: 13px;
}

.other-detail-list strong {
  font-size: 12px;
}

.other-entry-item {
  display: grid;
  grid-template-columns: 34px 56px minmax(120px, 1fr) max-content max-content max-content;
  gap: 5px;
  align-items: center;
  border-bottom: 1px dotted #9b927f;
  padding: 3px 0;
  font-size: 12px;
  font-weight: 700;
}

.other-entry-source {
  color: var(--muted);
}

.other-entry-amount {
  text-align: right;
}

.other-entry-description {
  min-width: 0;
}

.other-entry-time {
  color: var(--muted);
  font-size: 11px;
}

.daily-formula-card {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 0 0;
}

.daily-formula-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.daily-formula-card strong {
  font-size: 18px;
  line-height: 1.1;
}

.shift-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.shift-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 7px 8px;
  font-size: 12px;
}

.shift-card strong {
  font-size: 13px;
}

.reception-pay-formula {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 5px;
  font-size: 13px;
  font-weight: 700;
}

.reception-pay-formula strong {
  font-size: 14px;
}

.reception-pay-formula em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.girls-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.girls-grid button,
.service-grid button,
.girl-clear-button {
  min-height: 28px;
  border: 1.35px solid var(--line);
  background: var(--field);
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 700;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 84px);
  gap: 4px;
  width: max-content;
}

.service-grid button {
  min-height: 30px;
  font-size: 13px;
}

.selected-job .staff-cell button:not(:empty) {
  background: #fff3bf;
}

.totals-bar {
  display: flex;
  gap: 6px;
}

.cash-bar,
.card-bar {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  min-height: 30px;
  border: 1.35px solid var(--line);
  background: #f5f1e6;
  padding: 4px 8px;
}

.cash-bar span,
.card-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cash-bar strong,
.card-bar strong {
  font-size: 20px;
  line-height: 1;
}

.card-bar strong,
.amount-card {
  color: #b01818;
}

.floating-panel-moved {
  z-index: 18;
  margin: 0;
  position: fixed;
}

.is-dragging {
  cursor: grabbing;
  box-shadow: 0 10px 22px rgb(0 0 0 / 20%);
}

.amount-cash {
  color: var(--ink);
}

.job-sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: transparent;
}

.job-sheet th,
.job-sheet td {
  border-right: 1.35px solid var(--line);
  border-bottom: 1.35px solid var(--line);
  height: 34px;
  padding: 0;
  vertical-align: middle;
}

.job-sheet tr > :first-child {
  border-left: 1.35px solid var(--line);
}

.job-sheet thead tr th {
  border-top: 1.35px solid var(--line);
}

.job-sheet thead tr th {
  height: 34px;
  text-align: left;
  padding-left: 8px;
  font-size: 16px;
  vertical-align: middle;
}

.header-extra-button {
  display: block;
  width: 42px;
  height: 20px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.job-sheet thead tr th {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: var(--paper);
}

.col-no {
  width: 48px;
}

.col-time {
  width: 122px;
}

.col-total {
  width: 70px;
}

.col-girl-no {
  width: 40px;
}

.col-staff {
  width: 60px;
}

.col-extra {
  width: 46px;
}

.col-shop {
  width: 64px;
}

.job-sheet tbody th {
  padding-left: 9px;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
}

.time-cell {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.time-cell button,
.time-cell output {
  display: block;
  width: 100%;
  height: 33px;
  border: 0;
  background: transparent;
}

.time-cell button {
  border-right: 1px dotted #7b7467;
  cursor: default;
}

.start-time-button {
  font-weight: 700;
}

.total-cell button,
.girl-no-cell button,
.staff-cell button {
  width: 100%;
  height: 33px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: default;
}

.selected-job th,
.selected-job td {
  background: #fffaf0;
}

.total-cell button {
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  min-height: 33px;
  height: auto;
  padding: 2px 0;
  white-space: pre-line;
}

.total-cell button.amount-card {
  color: #b01818;
}

.girl-no-cell button {
  font-weight: 700;
  font-size: 15px;
}

.girl-no-cell button,
.staff-cell button {
  height: 100%;
  min-height: 33px;
}

.job-sheet th:first-child,
.girl-no-cell,
.job-sheet thead th:nth-child(4) {
  text-align: center;
}

.staff-cell button {
  font-size: 14px;
  line-height: 15px;
  white-space: normal;
}

.commission-line,
.tip-line {
  display: block;
}

.tip-line {
  color: var(--ink);
}

.booking-marker,
.add-up-marker {
  color: #b01818;
}

.shop-cell output {
  display: block;
  min-height: 33px;
  padding-top: 8px;
  text-align: center;
  font-size: 14px;
}

.staff-unpaid-row th,
.staff-unpaid-row td {
  height: 62px;
  background: var(--paper);
}

.staff-unpaid {
  padding: 4px 3px;
  text-align: center;
}

.staff-unpaid strong {
  display: block;
  min-height: 24px;
  margin: 2px 0 5px;
  font-size: 15px;
}

.staff-unpaid button {
  width: 100%;
  min-height: 22px;
  border: 1px solid var(--line);
  background: var(--field);
  font-size: 11px;
  font-weight: 700;
}

.staff-unpaid button:disabled {
  color: var(--muted);
  opacity: 0.45;
}

.context-menu {
  position: absolute;
  z-index: 20;
  display: flex;
  gap: 4px;
  border: 1.35px solid var(--line);
  background: var(--field);
  padding: 4px;
  box-shadow: 0 8px 18px rgb(0 0 0 / 16%);
}

.context-menu[hidden] {
  display: none !important;
}

.context-menu button {
  min-width: 58px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 700;
}

.service-action-menu {
  display: grid;
  grid-template-columns: 64px 70px 116px 58px;
  align-items: start;
}

.collection-type-menu {
  display: grid;
  grid-template-columns: 116px 116px;
}

.service-selection-menu {
  display: grid;
  grid-template-columns: 74px max-content;
  align-items: start;
  grid-auto-rows: min-content;
}

.service-selection-menu .service-grid {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.service-selection-menu [data-service-clear] {
  grid-column: 1;
  grid-row: 1;
}

.service-selection-menu [data-service-more] {
  grid-column: 1;
  grid-row: 2;
}

.service-selection-menu [data-service-clear],
.service-selection-menu [data-service-more] {
  min-width: 74px;
  min-height: 42px;
}

.uncommon-service-menu {
  display: grid;
  gap: 5px;
}

.uncommon-service-head,
.uncommon-service-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.uncommon-service-pages {
  grid-template-columns: 74px 1fr 74px;
  align-items: center;
}

.uncommon-service-pages output {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.uncommon-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 5px;
  width: 330px;
}

.uncommon-service-grid button,
.uncommon-service-empty {
  min-height: 58px;
}

.uncommon-service-grid button {
  display: grid;
  gap: 1px;
  align-content: center;
  text-align: left;
}

.uncommon-service-grid button strong,
.uncommon-service-grid button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uncommon-service-grid button span {
  color: var(--muted);
  font-size: 11px;
}

.uncommon-service-empty {
  border: 1px dashed transparent;
}

.time-edit-menu {
  display: grid;
  grid-template-columns: repeat(3, 58px);
}

.collection-payment-menu label,
.mixed-payment-menu label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.collection-payment-menu input,
.mixed-payment-menu input {
  min-height: 26px;
  width: 90px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 3px 5px;
  color: var(--ink);
  font-weight: 700;
}

.mixed-card-line,
.mixed-cash-line {
  display: block;
}

.mixed-card-line {
  color: #b01818;
}

.mixed-cash-line {
  color: var(--ink);
}

.girl-selection-menu {
  display: grid;
  gap: 4px;
}

.girl-selection-menu .girls-grid {
  width: 720px;
}

.girl-selection-menu .girls-grid button {
  text-align: left;
  white-space: nowrap;
}

.girl-clear-button {
  width: 70px;
  min-width: 0;
}

.girl-selection-menu .girls-grid.single-row {
  grid-template-columns: repeat(6, 1fr);
}

.staff-header {
  cursor: default;
  text-align: center;
  padding-left: 0 !important;
}

.job-sheet thead th:first-child,
.job-sheet thead th:nth-child(4),
.job-sheet thead th:nth-child(15),
.job-sheet thead th:nth-child(16) {
  text-align: center;
  padding-left: 0;
}

.shop-total {
  text-align: center;
}

.shop-total span,
.shop-total strong {
  display: block;
}

.shop-total span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.shop-total strong {
  margin-top: 4px;
  font-size: 15px;
}

.job-sheet button:focus-visible,
.system-button:focus-visible,
.extra-button:focus-visible,
.header-extra-button:focus-visible,
.girls-grid button:focus-visible,
.service-grid button:focus-visible,
.context-menu button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #000;
  outline-offset: -2px;
}

.master-shell {
  min-width: 980px;
}

.master-stage {
  display: block;
  max-width: 1100px;
}

.master-stage .sheet-top {
  width: 100%;
  margin-bottom: 12px;
  align-items: center;
}

.master-stage h1 {
  margin: 0;
  font-size: 26px;
}

.master-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
}

.master-wide {
  grid-column: 1 / -1;
}

.master-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.master-block {
  background: var(--paper);
  border: 1px solid rgb(38 35 29 / 45%);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 26px rgb(0 0 0 / 13%);
}

.master-block h2 {
  margin: 0;
  font-size: 18px;
}

.master-block table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  table-layout: fixed;
}

.master-block th,
.master-block td {
  border: 0;
  height: 38px;
  padding: 5px 6px;
  text-align: left;
}

.master-block th {
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.master-block input,
.master-block select {
  width: 100%;
  min-height: 28px;
  border: 1px solid rgb(38 35 29 / 22%);
  border-radius: 4px;
  background: var(--field);
  padding: 3px 5px;
}

.master-block tbody td {
  background: rgb(255 253 245 / 68%);
}

.master-block tbody tr td:first-child {
  border-radius: 6px 0 0 6px;
}

.master-block tbody tr td:last-child {
  border-radius: 0 6px 6px 0;
}

.master-block input[type="checkbox"],
.compact-toggle-cell input[type="checkbox"] {
  appearance: none;
  width: 34px;
  min-height: 18px;
  border: 1px solid rgb(38 35 29 / 35%);
  border-radius: 999px;
  background: #d8d0bf;
  padding: 0;
  vertical-align: middle;
}

.master-block input[type="checkbox"]:checked,
.compact-toggle-cell input[type="checkbox"]:checked {
  background: #2f6f4f;
  box-shadow: inset 16px 0 0 var(--field);
}

.compact-toggle-cell {
  text-align: center;
}

.staff-master-head {
  justify-content: flex-start;
  align-items: flex-start;
}

.staff-master-head .extra-button {
  order: -1;
  min-width: 88px;
}

.staff-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 0;
}

.staff-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.staff-summary strong {
  font-size: 14px;
}

.staff-order-number {
  text-align: center;
}

.staff-order-number span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

[data-master-table="girls"] th:nth-child(1),
[data-master-table="girls"] td:nth-child(1) {
  width: 42px;
}

[data-master-table="girls"] th:nth-child(2),
[data-master-table="girls"] td:nth-child(2) {
  width: 260px;
}

[data-master-table="girls"] th:nth-child(3),
[data-master-table="girls"] td:nth-child(3) {
  width: 150px;
}

[data-master-table="girls"] th:nth-child(4),
[data-master-table="girls"] td:nth-child(4) {
  width: 88px;
  text-align: center;
}

[data-master-table="girls"] th:nth-child(5),
[data-master-table="girls"] td:nth-child(5) {
  width: 136px;
  text-align: center;
}

.master-block .duration-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.master-block .duration-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.master-action-head,
.master-action-cell {
  width: 64px;
  text-align: center;
}

.master-action-cell button {
  width: 100%;
  min-height: 26px;
  border: 1px solid var(--line);
  background: var(--field);
  font-size: 12px;
  font-weight: 700;
}

.staff-row-actions {
  position: relative;
  display: grid;
  grid-template-columns: 28px 28px;
  justify-content: center;
  gap: 4px;
}

.staff-row-actions button {
  min-height: 26px;
  width: 28px;
  padding: 0;
  border-radius: 4px;
}

.drag-handle-button {
  cursor: grab;
  touch-action: none;
  font-size: 15px;
}

.row-menu-button {
  font-size: 16px;
}

.row-action-menu {
  position: absolute;
  right: 6px;
  top: 34px;
  z-index: 12;
  min-width: 76px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field);
  padding: 4px;
  box-shadow: 0 8px 18px rgb(0 0 0 / 16%);
}

.row-action-menu[hidden] {
  display: none;
}

.row-action-menu button {
  width: 100%;
  min-height: 26px;
  font-size: 12px;
}

.staff-order-row.is-staff-dragging {
  outline: 2px solid var(--line);
  background: #fffaf0;
}

.staff-drag-active {
  cursor: grabbing;
}

.master-block .extra-button {
  padding: 5px 9px;
  font-size: 12px;
}

.store-block,
.settings-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 16px;
}

.store-block h2,
.settings-block h2 {
  grid-column: 1 / -1;
}

.store-block label,
.settings-block label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.retention-input-line {
  display: inline-grid;
  grid-template-columns: 74px auto;
  align-items: center;
  gap: 8px;
}

.retention-input-line input {
  text-align: right;
}

.retention-input-line em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.settings-block > .system-button {
  align-self: end;
  justify-self: start;
}

.daily-sheet-versions,
.sheet-version-viewer {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.daily-sheet-versions h3,
.daily-sheet-version-group h4 {
  margin: 0;
}

.daily-sheet-version-list,
.daily-sheet-version-group {
  display: grid;
  gap: 8px;
}

.daily-sheet-version-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.sheet-version-viewer[hidden] {
  display: none;
}

.sheet-version-viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-version-preview pre {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--field);
  padding: 8px;
  font-family: Arial, Helvetica, sans-serif;
  white-space: pre-wrap;
}

.girl-selection-menu .girls-grid,
.girl-selection-menu .girls-grid.single-row {
  width: 720px;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.girl-selection-menu .girls-grid button {
  min-width: 110px;
  overflow: visible;
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 1220px) {
  body {
    min-width: 0;
  }

  .app-shell {
    overflow-x: auto;
  }
}
