:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #342529;
  background: #f6efeb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(22px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 34%, #fff9f3 3%, #f6efeb 49%, #eadcda 100%);
}
main { width: min(100%, 420px); text-align: center; }
.pillow { display: block; width: min(100%, 400px); height: auto; margin: 0 auto -8px; }
h1 { font-size: 1rem; font-weight: 550; color: #70585e; margin: 0 0 8px; }
output {
  display: block;
  font: 500 clamp(2.45rem, 13vw, 5.2rem)/1.13 Georgia, serif;
  letter-spacing: -.065em;
  white-space: nowrap;
}
output.compact { font-size: clamp(1.65rem, 8.5vw, 3.75rem); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
main > .actions { margin: 28px auto 0; max-width: 340px; }
button {
  font: inherit;
  font-weight: 600;
  color: #553740;
  border: 1px solid #bfa9ae;
  background: #fff9f59c;
  border-radius: 100px;
  padding: 10px;
  min-height: 52px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button span { margin-right: .23em; font-size: 1.12em; }
button.primary { color: #fff9f7; background: #663d4b; border-color: #663d4b; }
button:active { filter: brightness(.91); }
:focus-visible { outline: 2px solid #87576b; outline-offset: 3px; }
.feedback { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #70585e; font-size: .875rem; }
dialog {
  width: min(380px, calc(100% - 32px));
  max-height: 90dvh;
  border: 1px solid #e3d2d1;
  border-radius: 28px;
  padding: 24px;
  background: #fff8f4;
  color: inherit;
  box-shadow: 0 20px 80px #40203430;
}
dialog::backdrop { background: #3d263c55; }
h2 { margin: 0 0 18px; font-size: 1.45rem; }
label { display: block; margin-bottom: 8px; color: #70585e; }
#amount { width: 100%; padding: 12px 14px; background: #fff; color: inherit; border: 1px solid #bfa9ae; border-radius: 14px; font: inherit; font-size: 1.4rem; }
#error { color: #892a49; font-size: .875rem; min-height: 1.3em; margin: 8px 0 15px; }
@media (max-height: 560px) and (orientation: landscape) { .pillow { width: 220px; } }
