.selector.billing-enabled {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(64px, 1fr);
  gap: 8px;
}

.bill-open-button {
  width: 100%;
  min-height: 46px;
  padding: 0;
  border: 1px solid #ddd7cc;
  border-radius: 8px;
  background: #fff;
  color: #236b61;
  font-size: 0;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.bill-open-button svg {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto;
}

.bill-open-button:focus {
  outline: 3px solid rgba(35, 107, 97, .18);
  outline-offset: 2px;
}

.day-list {
  gap: 18px !important;
}

.day-card {
  border: 3px solid #5aa7d8 !important;
  border-radius: 16px !important;
  box-shadow: 0 0 0 3px rgba(90, 167, 216, .14);
}

.day-card .day-head {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: stretch !important;
}

.day-card .day-head > div:not(.day-badge):not(.day-weather-card) {
  display: none;
}

.day-badge {
  min-height: 56px !important;
  display: grid !important;
  align-content: center !important;
}

.day-weather-card {
  min-width: 0;
  min-height: 56px;
  height: 100%;
  padding: 4px;
  border: 1px solid #cfe4df;
  border-radius: 8px;
  background: #f7fffc;
  color: #183c37;
  align-self: stretch;
}

.day-weather-card.loading {
  opacity: .78;
}

.day-weather-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  height: 100%;
  min-height: 46px;
  padding: 0 8px;
}

.weather-icon {
  flex: 0 0 auto;
  color: #183c37;
  font-size: 26px;
  line-height: 1;
  text-align: center;
}

.weather-temp,
.weather-wind {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  color: #183c37;
  font-weight: 950;
  line-height: 1.08;
  white-space: nowrap;
}

.weather-temp {
  font-size: 18px;
}

.weather-wind {
  font-size: 15px;
}

.journal p {
  font-size: 18px !important;
}

.day-weather-error {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: #687872;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.bill-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  flex-direction: column;
  background: #f7f5f0;
  color: #242424;
}

.bill-overlay.open {
  display: flex;
}

.bill-overlay-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid #ddd7cc;
  background: rgba(247, 245, 240, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bill-overlay-title {
  flex: 1 1 auto;
  min-width: 0;
}

.bill-overlay-title h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.bill-overlay-title p {
  margin: 1px 0 0;
  color: #6c675f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.bill-close-button,
.bill-secondary-button,
.bill-primary-button,
.bill-danger-button,
.bill-icon-button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.bill-close-button,
.bill-secondary-button,
.bill-icon-button {
  border: 1px solid #ddd7cc;
  background: #fffdfa;
  color: #235d59;
}

.bill-primary-button {
  border: 1px solid #236b61;
  background: #236b61;
  color: #fff;
}

.bill-danger-button {
  border: 1px solid #b84747;
  background: #fff5f5;
  color: #9b3131;
}

.bill-close-button {
  flex: 0 0 auto;
  padding: 0 13px;
}

.bill-overlay-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 10px calc(22px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.bill-shell {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.bill-panel {
  padding: 13px;
  border: 1px solid #ddd7cc;
  border-radius: 8px;
  background: #fffdfa;
}

.bill-panel h3 {
  margin: 0 0 8px;
  color: #6c675f;
  font-size: 15px;
  line-height: 1.35;
}

.bill-camera-card {
  display: grid;
  min-height: 154px;
  place-items: center;
  padding: 16px;
  border: 1px dashed #7fb5aa;
  border-radius: 8px;
  background: #f3fbf8;
  color: #235d59;
  text-align: center;
  font-size: 19px;
  font-weight: 900;
}

.bill-camera-card span {
  display: block;
  margin-top: 5px;
  color: #6c675f;
  font-size: 13px;
  font-weight: 800;
}

.bill-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bill-photo-preview {
  display: none;
  width: 100%;
  max-height: 260px;
  margin-top: 10px;
  object-fit: contain;
  border: 1px solid #ddd7cc;
  border-radius: 8px;
  background: #fff;
}

.bill-photo-preview.visible {
  display: block;
}

.bill-action-row,
.bill-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.bill-action-row > button,
.bill-list-actions > button,
.bill-list-actions > a {
  flex: 1 1 142px;
  padding: 8px 10px;
}

.bill-status {
  margin: 9px 0 0;
  color: #6c675f;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.bill-status.warning {
  color: #96611e;
}

.bill-form {
  display: grid;
  gap: 10px;
}

.bill-field {
  display: grid;
  gap: 4px;
}

.bill-field label,
.bill-check label {
  color: #5d6764;
  font-size: 13px;
  font-weight: 900;
}

.bill-field input,
.bill-field select,
.bill-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #ddd7cc;
  border-radius: 8px;
  background: #fff;
  color: #242424;
  font-size: 16px;
}

.bill-field textarea {
  min-height: 94px;
  resize: vertical;
}

.bill-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.bill-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff5e4;
}

.bill-check input {
  width: 20px;
  height: 20px;
}

.expense-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.expense-item {
  padding: 10px;
  border: 1px solid #ddd7cc;
  border-radius: 8px;
  background: #fff;
}

.expense-item h4 {
  margin: 0 0 3px;
  font-size: 16px;
  line-height: 1.35;
}

.expense-meta {
  margin: 0;
  color: #6c675f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.expense-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.expense-flag {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f3ef;
  color: #235d59;
  font-size: 12px;
  font-weight: 900;
}

.expense-flag.review {
  background: #fff5e4;
  color: #96611e;
}

.expense-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.expense-actions button {
  flex: 1 1 92px;
  padding: 7px 9px;
}

.bill-local-note {
  margin: 0;
  color: #6c675f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

body.bill-overlay-open {
  overflow: hidden;
}

@media (max-width: 420px) {
  .selector.billing-enabled {
    grid-template-columns: minmax(0, 3fr) minmax(60px, 1fr);
  }

  .day-weather-card {
    min-height: 56px;
    padding: 4px;
  }

  .day-weather-content {
    gap: 7px;
    padding: 0 6px;
  }

  #day-selector {
    font-size: 16px;
  }

  .bill-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  .journal p {
    font-size: 19px !important;
  }
}
