@layer game {
  .phase-finished .table-status { display: none; }

  .phase-finished .game-table__center {
    grid-column: 1 / -1;
    grid-row: 2 / -1;
    z-index: 3;
    overflow-y: auto;
    place-items: start center;
    padding-block: 4px 12px;
  }

  .receipt-wrap {
    width: min(100%, 360px);
    filter: drop-shadow(0 12px 22px rgb(0 0 0 / 0.4));
  }

  /* The zigzag tear along the bottom is a mask, so it also cuts the paper's own background. */
  .receipt {
    --tear: 9px;
    padding: 20px 20px calc(24px + var(--tear));
    background:
      linear-gradient(180deg, rgb(0 0 0 / 0.025), transparent 30%),
      var(--schuim);
    color: var(--inkt);
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tear)) 100%;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tear)) 100%;
    border-radius: 4px 4px 0 0;
    font-variant-numeric: tabular-nums;
  }

  .receipt__header {
    position: relative;
    padding-bottom: 12px;
    border-bottom: 2px dashed #c9b998;
  }

  .receipt__kicker {
    color: #5e5546;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .receipt__kicker .suit-symbol { font-size: 1rem; }

  .receipt__title {
    margin-top: 4px;
    font-size: 1.75rem;
    color: var(--laken);
  }

  .receipt--wet .receipt__title { color: var(--eiken); }
  .receipt--pass-game .receipt__title { color: var(--inkt); }

  .receipt__facts {
    display: grid;
    gap: 2px;
    margin-top: 8px;
    font-weight: 700;
  }

  .receipt__facts li::before { content: "♠ "; color: var(--laken); }

  .receipt__summary { margin-top: 2px; padding-right: 56px; color: #3d372e; }

  .receipt__stamp {
    position: absolute;
    right: 0;
    top: 8px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 3px solid var(--laken);
    border-radius: 50%;
    color: var(--laken);
    font-size: 1.6rem;
    font-weight: 800;
    rotate: -10deg;
    opacity: 0.85;
  }

  .receipt--wet .receipt__stamp {
    border-color: var(--suit-blue);
    color: var(--suit-blue);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .receipt__lines { width: 100%; margin-top: 8px; }

  .receipt__lines th,
  .receipt__lines td {
    padding: 7px 0;
    border-bottom: 1px dotted #c9b998;
    text-align: left;
    vertical-align: baseline;
  }

  .receipt__lines tbody th { font-weight: 700; }
  .receipt__lines tr.is-me th::after { content: " (jij)"; color: #5e5546; font-weight: 400; }

  .receipt__role {
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--messing);
    font-size: 0.72rem;
    font-weight: 700;
  }

  .receipt__tricks { color: #5e5546; font-size: 0.9rem; text-align: right !important; padding-right: 14px !important; }

  .receipt__points,
  .receipt__balance {
    font-size: 1.15rem;
    font-weight: 800;
    text-align: right !important;
    white-space: nowrap;
  }

  .receipt__points.is-plus { color: var(--laken); }
  .receipt__points.is-minus { color: #a30d25; }
  .receipt__points.is-zero { color: #5e5546; }

  .receipt__lines tfoot th,
  .receipt__lines tfoot td { border-bottom: 0; border-top: 2px solid var(--inkt); font-weight: 800; }

  .receipt__balance { color: var(--laken); }

  .receipt__standings { margin-top: 14px; padding-top: 12px; border-top: 2px dashed #c9b998; }

  .receipt__standings h4 {
    margin-bottom: 6px;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5e5546;
  }

  .receipt__standings ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

  .receipt__standings li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
  }

  .receipt__total { font-weight: 800; }

  .receipt__footer { margin-top: 18px; }

  .receipt__footer .btn--primary { background: var(--laken); color: var(--schuim); }
  .receipt__footer .btn--primary:hover { background: var(--laken-deep); }
  .receipt :focus-visible { outline-color: var(--messing-dark); }
  .receipt__next { display: block; width: 100%; }
}

@media (min-width: 720px) {
  @layer game {
    .phase-finished .game-table__center { grid-column: 2; }
  }
}
