@import url('https://fonts.googleapis.com/css2?family=Anton&family=Barlow+Semi+Condensed:wght@500;600;700&family=Kaushan+Script&family=Work+Sans:wght@400;500;600&display=swap');
:root {
  color-scheme: dark;
  --paper: #060f24; --paper-2: #0e1c42; --white: #0a1736; --ink: #e9edf7; --ink-2: #9aa7c7; --line: #22397a; --line-2: #3a56a8;
  --blue: #12308f; --star: #ffc72c; --star-d: #c9911a; --brick: #55a1f2; --brick-d: #ffc72c; --leaf: #7be0b0; --tint: #17306e; --navy-ink: #0a1a4a;
  --r: 18px; --ease: cubic-bezier(.16, 1, .3, 1);
  --display: Anton, 'Arial Narrow', sans-serif; --util: 'Barlow Semi Condensed', 'Work Sans', sans-serif; --script: 'Kaushan Script', cursive;
}
* { box-sizing: border-box; }
html { background: var(--paper); scrollbar-color: var(--line-2) var(--paper); }
body { margin: 0; color: var(--ink); font: 400 1.0625rem/1.55 'Work Sans', 'Helvetica Neue', sans-serif; -webkit-text-size-adjust: 100%; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; margin: 0; color: #fff; }
h1 { font-size: clamp(2.1rem, 8vw, 3rem); line-height: 1.05; }
h2 { font-size: 1.5rem; }
.script { font-family: var(--script); color: var(--star); font-size: 1.35rem; margin: 0 0 .2rem; }
::selection { background: var(--star); color: var(--navy-ink); }
:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; border-radius: 6px; }
main { max-width: 40rem; margin: 0 auto; padding: 0 16px 5rem; }
.embed main { max-width: none; padding: 0; }
.embed .panel { margin-top: 0; }
.panel { background: var(--paper-2); border: 1.5px solid var(--line); border-top: 3px solid var(--star); border-radius: var(--r); padding: 1.6rem 1.25rem 1.5rem; margin-top: .75rem; box-shadow: 0 18px 40px -22px #000c; }
.wide { max-width: 72rem; }
main.wide { padding-top: .5rem; }
.panel.head { padding-bottom: 1.1rem; }
.panel.head .bar { margin: 1.1rem 0 .9rem; }
.panel.head .sum { margin: 0; }
header.top { background: var(--blue); border-bottom: 3px solid var(--star); text-align: center; padding: .9rem 16px .8rem; }
header.top img { height: 84px; width: auto; display: block; margin: 0 auto; }
header.top span { display: block; font: 600 .95rem var(--util); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-top: .2rem; }
.lede { color: var(--ink-2); max-width: 36rem; margin: .75rem 0 2rem; }
form > section { padding: 1.5rem 0; border-top: 1.5px solid var(--line); }
form > section:first-of-type { border-top: 0; }
label, legend { display: block; font: 600 .95rem var(--util); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .4rem; padding: 0; color: #fff; }
.hint { color: var(--ink-2); font-size: .94rem; margin: -.15rem 0 .6rem; }
input[type=text], input[type=email], input[type=number], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; padding: .75rem .85rem; min-height: 48px; transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 5.5rem; resize: vertical; }
input[type=file]::file-selector-button { font: 600 .9rem var(--util); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: var(--paper-2); border: 1.5px solid var(--line-2); border-radius: 8px; padding: .5rem .8rem; margin-right: .7rem; cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--star); box-shadow: 0 0 0 4px #e8a51d33; }
::placeholder { color: #6f7fa8; }
.field { margin-top: 1.1rem; }
input[type=checkbox] { accent-color: var(--star); }
.field:first-child { margin-top: 0; }
.tiles { display: grid; gap: .6rem; }
.tiles label { margin: 0; position: relative; display: flex; }
a { color: var(--brick); text-underline-offset: 3px; }
.tiles input { position: absolute; opacity: 0; inset: 0; }
.tiles span { flex: 1; display: block; padding: .85rem 1rem; background: var(--white); border: 1.5px solid var(--line); border-radius: 14px; font: 600 1.05rem var(--util); letter-spacing: .03em; cursor: pointer; transition: transform .25s var(--ease), border-color .2s, background .2s; min-height: 48px; }
.tiles small { display: block; font: 400 .9rem 'Work Sans', sans-serif; letter-spacing: 0; text-transform: none; color: var(--ink-2); font-size: .9rem; }
.tiles span:hover { border-color: var(--line-2); }
.tiles input:checked + span { border-color: var(--star); background: var(--tint); }
.tiles input:focus-visible + span { outline: 3px solid var(--star); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.money { position: relative; }
.money b { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.money input { padding-left: 1.7rem; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.4rem; height: 1.4rem; margin-top: .15rem; accent-color: var(--brick); flex: none; }
.balance { display: inline-block; background: var(--paper-2); border-radius: 999px; padding: .35rem .9rem; font-size: .95rem; margin-top: .6rem; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.drop { border: 2px dashed var(--line-2); border-radius: var(--r); padding: 1.6rem 1rem; text-align: center; background: var(--white); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--star); background: var(--tint); }
.drop strong { display: block; font: 400 1.3rem var(--display); text-transform: uppercase; color: #fff; }
.drop span { color: var(--ink-2); font-size: .94rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; margin-top: .8rem; padding: 0; list-style: none; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; font-size: .8rem; text-align: center; padding: 4px; }
.thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #000000b3; color: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font: 700 1rem var(--util); letter-spacing: .06em; text-transform: uppercase; background: var(--star); color: var(--navy-ink); border: 0; border-radius: 14px; padding: .95rem 1.6rem; min-height: 52px; cursor: pointer; box-shadow: 0 8px 16px -8px #000b; transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn:hover:not(:disabled) { background: #ffd65c; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
#go { position: sticky; bottom: 12px; z-index: 2; box-shadow: 0 0 0 6px var(--paper-2), 0 10px 22px -6px #000d; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.ghost:hover:not(:disabled) { background: var(--tint); }
.err { color: #ff9b80; font-weight: 600; margin: 1rem 0 0; min-height: 1.5em; }
.done { text-align: left; padding: 2rem 1.5rem 1.75rem; }
.done .id { font: 400 clamp(2.6rem, 12vw, 4.2rem)/1 var(--display); color: var(--star); font-variant-numeric: tabular-nums; margin: .5rem 0 1rem; }
.hp { position: absolute; left: -9999px; }
/* admin */
.bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.2rem 0; }
.bar .grow { flex: 1; min-width: 12rem; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 12px; padding: 3px; }
.seg button { font: 600 .95rem var(--util); letter-spacing: .06em; text-transform: uppercase; border: 0; background: none; padding: .55rem 1rem; border-radius: 9px; cursor: pointer; color: var(--ink-2); min-height: 44px; }
.seg button[aria-pressed=true] { background: var(--star); color: var(--navy-ink); box-shadow: 0 1px 3px #000000aa; }
.sum { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sum b { color: var(--ink); }
.rows { display: grid; gap: 1.1rem; padding: 0; list-style: none; margin: 1.1rem 0 0; }
.row { background: var(--paper-2); border: 1.5px solid var(--line); border-top: 3px solid var(--star); border-radius: var(--r); padding: 1.15rem 1.25rem 1.1rem; display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; box-shadow: 0 14px 30px -22px #000c; }
.row .amt { font: 400 1.5rem var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.row .meta { color: var(--ink-2); font-size: .95rem; line-height: 1.6; grid-column: 1 / -1; }
.row .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: .7rem; padding-top: .9rem; border-top: 1.5px solid var(--line); }
.row .acts input { flex: 1; min-width: 10rem; }
.row .acts a { font-weight: 600; }
.row .acts [data-edit] { margin-left: auto; }
.tag { display: inline-block; font: 600 .8rem var(--util); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .1rem .6rem; background: var(--paper-2); }
.tag.pay { background: #3a2f0c; color: var(--star); } .tag.ok { background: #0f3a33; color: var(--leaf); }
.row .btn { padding: .55rem 1rem; min-height: 44px; font-size: .95rem; box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .8rem .6rem; border-bottom: 1.5px solid var(--line); } th { font: 600 .85rem var(--util); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
form.edit { grid-column: 1 / -1; }
.edit .grid { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: .8rem 0; }
.edit .field { margin: 0; } .edit .field label { font-weight: 500; }
.rcpts { list-style: none; padding: 0; margin: .4rem 0 .8rem; display: grid; gap: .3rem; } .rcpts li { display: flex; gap: 1rem; align-items: center; }
.conf { color: var(--ink-2); }
.btn.danger { margin-left: auto; color: #ff9b80; box-shadow: inset 0 0 0 1.5px #ff9b8066; }
.btn.danger:hover:not(:disabled) { background: #3a1a1a; }
.row.editing { grid-template-columns: 1fr; }
/* receipt viewer */
dialog.viewer { border: 0; padding: 0; background: var(--paper-2); color: var(--ink); border-radius: var(--r); width: min(92vw, 60rem); height: min(88vh, 60rem); box-shadow: 0 30px 80px #000d; overflow: hidden; }
dialog.viewer::backdrop { background: #02060fcc; }
dialog.viewer[open] { display: flex; flex-direction: column; }
.viewer header { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; border-bottom: 1.5px solid var(--line); }
.viewer header b { flex: 1; font: 600 1rem var(--util); letter-spacing: .06em; text-transform: uppercase; }
.viewer .stage { flex: 1; min-height: 0; overflow: auto; background: #02060f; display: grid; place-items: center; padding: .5rem; }
.viewer .stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer .btn { padding: .4rem .9rem; min-height: 40px; box-shadow: none; font-size: .9rem; }
tr.detail > td { padding: 1.2rem 1rem 1.5rem; background: var(--white); }
tr.detail form + form { margin-top: 1.2rem; }
td.n, th.n { text-align: right; }
.gate { text-align: center; padding: 2.5rem 1.25rem 2rem; }
@media (min-width: 640px) { .tiles.cols { grid-template-columns: repeat(3, 1fr); } .row { grid-template-columns: 1fr auto auto; } .row .amt { grid-column: 3; grid-row: 1; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
