@media (min-width: 600px) {
  body {
    background: #eaf3e9;
  }
  #shell,
  #welcome {
    background-color: #f5faf3;
    box-shadow: 0 0 55px #1d552514;
  }
  .waves {
    z-index: 0;
  }
  #shell {
    position: relative;
    z-index: 1;
    background: linear-gradient(#f5faf3 80%, #e1efdd);
    border-left: 1px solid #e0ecdd;
    border-right: 1px solid #e0ecdd;
  }
  #welcome {
    position: relative;
    z-index: 1;
  }
  dialog {
    max-height: 94dvh;
  }
}
@media (max-width: 380px) {
  .app-header {
    height: 72px;
    padding: 10px 14px;
  }
  .brand strong {
    font-size: 31px;
  }
  main {
    padding: 17px 12px 0;
  }
  h1 {
    font-size: 25px;
  }
  .card {
    gap: 7px;
    padding: 10px 7px;
  }
  .card .symbol {
    width: 34px;
    height: 34px;
  }
  .card strong {
    font-size: 18px;
  }
  .card small {
    font-size: 8px;
  }
  .record {
    padding: 12px 10px;
  }
  .record-title strong {
    font-size: 15px;
  }
  .supply-bottom {
    gap: 6px;
  }
  .record-actions {
    gap: 5px;
  }
  .record-actions button {
    min-width: 29px;
  }
  .sale-values .values small {
    font-size: 8px;
  }
  .sale-values .values b {
    font-size: 9px;
  }
  .sale-values .values .badge {
    font-size: 7px;
  }
  .welcome-card {
    padding: 30px 20px 25px;
  }
  .welcome-card h1 {
    font-size: 25px;
  }
}
@media (max-width: 480px) {
  dialog {
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(#f4faf4 85%, #dfefdb);
  }
  dialog::backdrop {
    background: #f3faf4;
  }
  .modal-brand {
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .page-heading:has(h1#title) {
    flex-wrap: nowrap;
  }
  :is(#shell, #guide-host)[data-page="fin"] .page-heading {
    align-items: flex-start;
  }
  :is(#shell, #guide-host)[data-page="fin"] h1 {
    font-size: clamp(16px, 4.1vw, 20px);
    white-space: nowrap;
    line-height: 30px;
  }
  :is(#shell, #guide-host)[data-page="fin"] #heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 140px;
    gap: 5px;
  }
  :is(#shell, #guide-host)[data-page="fin"] #heading-actions input {
    width: 138px;
  }
  :is(#shell, #guide-host)[data-page="fin"] #heading-actions .orange {
    font-size: 12px;
    padding: 6px 10px;
  }
  .page-heading input {
    max-width: 122px;
  }
  .page-heading .orange {
    padding: 8px 10px;
  }
  :is(#shell, #guide-host)[data-page="sales"] #heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 132px;
  }
  .payment-summary b {
    font-size: 16px;
  }
  .field input,
  .field select {
    font-size: 16px;
    padding: 8px;
  }
  .field input::placeholder {
    font-size: 12px;
  }
  #form {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .welcome-card {
    transform: translateY(-10px);
  }
}
@media (display-mode: standalone),
  (display-mode: minimal-ui),
  (display-mode: window-controls-overlay) {
  #install {
    display: none !important;
  }
  .app-header {
    padding-top: max(12px, env(safe-area-inset-top));
  }
  #shell {
    padding-bottom: max(74px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: appear 0.15s ease;
  }
  @keyframes appear {
    from {
      transform: translateY(6px);
      opacity: 0.4;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}
@media (max-width: 380px) {
  .app-header {
    height: 86px;
    grid-template-columns: 48px 1fr 48px;
  }
  .brand strong {
    font-size: 35px;
  }
  .app-header > img {
    width: 48px;
    height: 48px;
  }
  .supply-record .record-title strong {
    font-size: 18px;
  }
  .supply-record .record-actions button {
    width: 36px;
    height: 36px;
  }
  .supply-record .record-actions .app-icon {
    width: 25px;
    height: 25px;
  }
  .supply-bottom .values b {
    font-size: 16px;
  }
}
/* O fundo acompanha a largura da tela também no computador. */
#shell {
  background: #f5faf3 url("/static/images/waves.svg") center bottom/100% 92px
    no-repeat;
}
@media (max-width: 480px) {
  .modal-brand .brand strong {
    font-size: 35px;
  }
  .modal-brand .brand small {
    font-size: 11px;
  }
}

.field input,
.field select,
.recipe-row input,
.recipe-row select {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}
.field input[readonly] {
  cursor: text;
}
