:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  background: #fff;
  color: #2d5661;
  --gold: #ffd70a;
  --line: #dfd1af;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  max-width: 33rem;
  margin: auto;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}
header { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.brand { color: #2d5661; text-decoration: none; letter-spacing: .18em; font-weight: 750; }
.brand span { font-size: .8rem; }
h1 { margin: 1.4rem 0 1rem; font: 2rem/1.15 Georgia, serif; }
h2 { font-size: 1.15rem; margin: 0 0 1rem; overflow-wrap: anywhere; }
.card { background: #fdf3da; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
label { display: block; margin-top: .75rem; }
#last-scan { margin-top: -.5rem; }
#service-names { margin-bottom: 12px; }
#name-hint, #name-status { margin: 4px 0; }
#service-entries { padding-left: 18px; overflow-wrap: anywhere; }
input, button, select { font: inherit; border-radius: 10px; min-height: 48px; }
input, select { width: 100%; padding: 8px 12px; border: 1px solid var(--line); background: #fff; color: inherit; }
button { width: 100%; border: 1px solid transparent; background: var(--gold); color: #1a1306; font-weight: 650; padding: 8px 12px; }
form button { margin-top: 16px; }
button:disabled, button.quiet { color: #2d5661; background: transparent; border-color: var(--line); }
button.quiet { width: auto; }
:focus-visible { outline: 3px solid #2d5661; outline-offset: 3px; }
.actions { display: grid; gap: 8px; }
.muted, #status { color: #395760; }
#reader { width: 100%; min-height: 220px; overflow: hidden; border-radius: 12px; margin-bottom: 14px; }
#reader video { max-width: 100%; display: block; }
.balance { margin: 0 0 14px; color: #2d5661; font-size: 1.8rem; font-weight: 700; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stamp { display: grid; place-items: center; min-height: 38px; border-radius: 8px; border: 1px solid var(--line); color: #2d5661; }
.stamp.collected { background: var(--gold); color: #1a1306; font-weight: 700; }
.reward { border-radius: 8px; padding: 10px; color: #1a1306; background: var(--gold); font-weight: 750; }
#service-count, #history, #demo-card, .card .actions { margin-top: 14px; }
summary { min-height: 44px; cursor: pointer; display: list-item; padding: 8px 0; }
#history-entries { padding-left: 18px; overflow-wrap: anywhere; }
dialog { width: min(90vw, 26rem); padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: #fdf3da; color: #2d5661; }
dialog::backdrop { background: #000a; }
dialog form button { margin: 0; }
.point-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.point-options button[aria-pressed="false"] { background: transparent; color: #2d5661; border-color: var(--line); }
.point-options button:disabled { opacity: .55; }
#history-entries button { margin-top: 6px; margin-bottom: 12px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; }
.brand img { display: block; }
.remember { display: flex; align-items: center; gap: .65rem; min-height: 44px; }
.remember input { width: 1.15rem; height: 1.15rem; min-height: 0; flex: none; accent-color: #2d5661; }
