:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #1a1b1e;
  --soft: #7d7a72;
  --line: rgba(26, 27, 30, 0.12);
  --accent: #c2512b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px 16px;
}

/* the shadow is on the wrapper: the paper has a mask for its torn edge, and a mask would cut its own shadow */
.bill { width: min(336px, 100%); filter: drop-shadow(0 1px 1px rgba(26, 27, 30, 0.1)) drop-shadow(0 26px 30px rgba(26, 27, 30, 0.16)); }
.bill__paper {
  padding: 18px 18px 26px;
  border-radius: 14px 14px 0 0;
  background: var(--paper);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / 14px 100%;
}
.bill__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bill__hotel { font-size: 16px; font-weight: 680; font-stretch: 110%; letter-spacing: -0.01em; }
.bill__stay { font-size: 12px; font-weight: 500; color: var(--soft); }

.bill__lines { padding: 5px 0; }
.item { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; overflow: hidden; border: 0; background: none; color: inherit; font: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
button.item { cursor: pointer; }
.item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.item__name { font-size: 14px; font-weight: 540; white-space: nowrap; }
.item__more { font-size: 12px; font-weight: 460; color: var(--soft); white-space: nowrap; }
.item__rule { flex: 1; height: 1px; min-width: 10px; background: var(--line); transform-origin: 0 50%; }
.item__amount { font-size: 14px; font-weight: 560; font-stretch: 102%; white-space: nowrap; }
.item__strike { position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.item__tag { flex: none; height: 18px; padding: 0 7px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 10.5px; line-height: 18px; font-weight: 640; }
.item.is-off .item__name, .item.is-off .item__amount, .item.is-off .item__more { color: var(--soft); }

.bill__foot { display: flex; align-items: flex-end; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--ink); }
.bill__label { font-size: 14px; font-weight: 640; }
.bill__note { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 460; color: var(--soft); }
.bill__total { display: block; font-size: clamp(32px, 10vw, 38px); line-height: 1; font-weight: 700; font-stretch: 108%; letter-spacing: -0.03em; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (max-height: 430px) {
  .item { height: 29px; }
  .bill__paper { padding: 14px 16px 22px; }
}
@media (min-width: 700px) and (min-height: 500px) {
  .bill { zoom: 1.3; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .bill { zoom: 1.65; }
}
