@font-face {
    font-family: Barlow;
    src: url("Barlow-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
:root {
    color-scheme: light;
    --ink: #18352f;
    --muted: #526760;
    --green: #105848;
    --line: #c9d4ce;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: #eff3ed;
    color: var(--ink);
    font: 16px/1.5 "Instrument Sans", "Segoe UI", Arial, sans-serif;
}
main.sheet {
    max-width: 590px;
    margin: clamp(18px, 5vh, 54px) auto;
    border: 1px solid #ccdad0;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 12px 44px #1c3d2a0c;
}
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 29px 34px 27px;
    color: #fff;
    background: #124737;
    border-bottom: 4px solid #c4dc89;
}
.hero h1, .receipt h2 {
    font-family: Barlow, "Segoe UI", sans-serif;
    font-size: clamp(32px, 6vw, 42px);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.08;
    margin: 0;
}
.hero p { color: #e5eee7; margin: 9px 0 0; font-size: .96rem; }
.court {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    width: 190px;
    height: 144px;
    right: -56px;
    top: -31px;
    border: 1px solid #81ad862e;
    transform: rotate(-19deg);
}
.court::before, .court::after, .court i {
    position: absolute;
    display: block;
    content: "";
    border: 1px solid #81ad862e;
}
.court::before { inset: 0 auto 0 44%; border-width: 0 0 0 1px; }
.court::after { top: 50%; left: 44%; width: 45px; height: 45px; border-radius: 50%; transform: translate(-50%, -50%); }
.court i { width: 33px; height: 72px; top: 50%; right: -1px; transform: translateY(-50%); }
.panel { padding: 25px 34px 30px; }
.field { margin: 0 0 19px; padding: 0; border: 0; min-width: 0; }
.field > label, legend {
    display: block;
    padding: 0;
    margin: 0 0 6px;
    font: 600 1.05rem/1.3 Barlow, "Segoe UI", sans-serif;
}
.field > input {
    display: block;
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 13px;
    background: #fcfdfb;
    color: var(--ink);
    font: inherit;
}
input::placeholder { color: #697a72; }
input[data-upper] { text-transform: uppercase; }
small { display: block; margin-top: 5px; color: var(--muted); font-size: .8125rem; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role {
    border: 1px solid var(--line);
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 13px;
    cursor: pointer;
}
.role input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); flex: 0 0 auto; }
.role:has(input:checked) { background: #edf6ed; border-color: var(--green); }
:focus-visible { outline: 3px solid #297b66; outline-offset: 2px; }
.alert { padding: 11px 14px; border-inline-start: 3px solid #a13723; background: #fff1e9; color: #752b1c; margin: 0 0 18px; }
.error { color: #942d22; }
.field > input[aria-invalid="true"] { border-color: #a32920; }
.actions { border-top: 1px solid #e1e8e0; margin-top: 21px; padding-top: 16px; }
.actions p, .receipt-actions p { font-size: .875rem; margin: 0 0 12px; color: var(--muted); }
button {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 7px;
    border: 0;
    background: var(--green);
    color: white;
    cursor: pointer;
    font: 600 1.1rem/1.3 Barlow, "Segoe UI", sans-serif;
}
button:hover { background: #0a4538; }
button > span { margin-left: 6px; }
a { color: var(--green); text-underline-offset: 3px; }
.receipt { text-align: center; }
.caption { margin: 0 0 3px; color: var(--muted); }
.receipt h2 { font-variant-numeric: tabular-nums; }
.qr { width: min(198px, 90%); height: auto; display: block; margin: 12px auto 17px; }
dl { border-block: 1px solid var(--line); padding: 6px 0; margin: 0; }
dl > div { display: flex; text-align: left; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; }
dt { color: var(--muted); flex-shrink: 0; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.receipt-actions { margin-top: 19px; }
.receipt-actions a { display: inline-block; margin-top: 15px; font-size: .9rem; }
.fallback p { margin-top: 0; }
@media (max-width: 630px) {
    main.sheet { margin: 15px 12px; }
    .hero { padding: 24px 21px; }
    .panel { padding: 22px 20px; }
}
@media print {
    body, .hero { background: white; color: black; }
    main.sheet { margin: 0 auto; width: 150mm; max-width: 100%; border: 1px solid #777; border-radius: 0; box-shadow: none; break-inside: avoid; }
    .hero { border-bottom: 1px solid #999; padding: 18px; text-align: center; }
    .receipt-actions, .court { display: none; }
    .qr { width: 44mm; }
}
