/* Shared by the public Play and bar account entry screens. */
body.bp-entry, body.bp-staff {
  --surface: #0d0f12;
  --surface-raised: #191c21;
  --text: #faf8f4;
  --text-muted: #b0b3ba;
  --brand-primary: #ff8a23;
  --brand-accent: var(--brand-primary);
  --on-brand: #14100b;
  --pw-line: #34383f;
  --radius: 16px;
  --entry-width: 480px;
}
body.bp-entry, body.bp-staff {
  --bg: var(--surface);
  --card: var(--surface-raised);
  --ink: var(--text);
  --muted: var(--text-muted);
  --line: var(--pw-line);
  --amber: var(--brand-primary);
  --gold: var(--brand-primary);
  --on-amber: var(--on-brand);
  --field: var(--surface);
  --bar: var(--surface);
  color-scheme: dark;
  background: radial-gradient(ellipse at 95% 0%, color-mix(in srgb, var(--brand-primary) 11%, transparent), transparent 45%), var(--surface);
}
html[data-bp-appearance="light"] body:is(.bp-entry, .bp-staff) {
  --surface: #fffaf5;
  --surface-raised: #fff;
  --text: #201a16;
  --text-muted: #645a52;
  --gold: #753300;
  --pw-line: #cec3b8;
  --bad: #a22119;
  --good: #67d2a1;
  color-scheme: light;
}
body.manage.bp-staff {
  --ink-2: var(--muted);
  --soft: color-mix(in srgb, var(--card), var(--ink) 5%);
  --deep: var(--bar);
  --amber-ink: var(--gold);
}
.bp-staff .app-panel-top { color: var(--ink); }
.bp-staff .r-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
html[data-bp-appearance="light"] .bp-staff .r-tabs span { filter: none; }
html[data-bp-appearance="light"] .bp-entry-brand > span:last-child { color: #dc5700; }
html[data-bp-appearance="light"] .bp-entry-mark { border-color: #dc5700; }
html[data-bp-appearance="light"] .bp-entry-mark::after { color: #dc5700; }

html:has(body.bp-entry) { scrollbar-gutter: stable; }
body.bp-entry {
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.bp-entry > .ph-frame { width: 100%; flex: 1; }
.bp-entry-head {
  position: sticky;
  top: 0;
  z-index: 4;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  width: 100%;
  border-bottom: 1px solid var(--pw-line);
  background: var(--surface);
  padding: calc(1rem + env(safe-area-inset-top)) max(1.25rem, calc((100% - var(--entry-width)) / 2 + 1.25rem)) .5rem;
}
:is(.bp-entry-head, .r-app-top, .app-panel-top, .m-top) .bp-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 .85rem;
  border: 1px solid var(--header-action-border, var(--line));
  border-radius: 999px;
  background: var(--header-action-bg, var(--card));
  color: var(--header-action-text, var(--ink));
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
:is(.app-panel-top:not(.bp-admin-top), .m-top) {
  --header-action-bg: color-mix(in srgb, var(--card) 8%, var(--deep));
  --header-action-border: color-mix(in srgb, var(--card) 24%, var(--deep));
  --header-action-text: var(--card);
}
.bp-header-action:focus-visible { outline: 2px solid var(--gold, var(--amber)); outline-offset: 2px; }
.m-top:has(> .bp-header-action) { gap: clamp(.5rem, 2vw, 1.5rem); }
.bp-entry-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font: 900 1.4rem/1 system-ui, sans-serif;
  letter-spacing: -.06em;
  text-decoration: none;
}
.bp-entry .bp-entry-brand { color: var(--text); }
.bp-entry-brand > span:last-child { color: var(--brand-primary); }
.bp-entry-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-right: .55rem;
  border-radius: 50%;
  border: 2px solid var(--brand-primary);
}
.bp-entry-mark::after, .bp-tab-play::after {
  content: '';
  border-block: 6px solid transparent;
  border-left: 9px solid currentColor;
  margin-left: 2px;
}
.bp-entry-mark::after { color: var(--brand-primary); }
.bp-entry-main.r-main {
  flex: 1;
  align-content: start;
  width: 100%;
  max-width: var(--entry-width);
  padding: 1rem 1.25rem 1.5rem;
}
.bp-entry-title {
  margin: 0;
  font: 850 clamp(1.9rem, 7.5vw, 2.45rem)/1.1 system-ui, sans-serif;
  letter-spacing: -.055em;
}
.bp-entry-card { border-top: 3px solid var(--brand-primary); border-radius: 20px; padding: 1.15rem; }
.bp-entry .r-location-group { margin: 0; }
.bp-entry .r-list a { overflow-wrap: anywhere; }
.bp-entry .r-list a:hover { border-color: var(--brand-primary); }
.bp-entry-tabs {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  --entry-tab-count: 2;
  grid-template-columns: repeat(var(--entry-tab-count), minmax(0, calc(var(--entry-width) / var(--entry-tab-count))));
  justify-content: center;
  gap: .4rem;
  padding: .4rem .75rem calc(.4rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--pw-line);
}
.bp-entry-tabs:has(> a:nth-child(3)) { --entry-tab-count: 3; }
.bp-entry-tabs:has(> a:nth-child(4)) { --entry-tab-count: 4; }
.bp-entry-admin .bp-entry-head {
  padding: calc(.5rem + env(safe-area-inset-top)) max(1rem, calc((100% - 1116px) / 2)) .5rem;
}
.bp-entry-admin { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
.bp-entry-admin .bp-admin-tabs a { text-decoration: none; }
.bp-entry-admin .bp-admin-tabs a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.bp-entry .bp-entry-tabs a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .3rem;
  min-height: 54px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
}
.bp-entry .bp-entry-tabs:has(> a:nth-child(4)) a {
  font-size: .8rem;
  text-align: center;
  white-space: nowrap;
}
.bp-entry .bp-entry-tabs a[aria-current="page"],
.bp-entry .bp-entry-tabs a:hover {
  color: var(--gold);
  background: color-mix(in srgb, var(--brand-primary) 12%, transparent);
}
.bp-tab-icon { display: grid; place-items: center; width: 20px; height: 20px; }
.bp-tab-admin::after {
  content: '';
  width: 15px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 20%, 88% 75%, 50% 100%, 12% 75%, 0 20%);
}
.bp-tab-points { border: 2px solid currentColor; border-radius: 50%; width: 18px; height: 18px; }
.bp-tab-points::after { content: ''; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
[data-points-page] .r-people form { flex: 0 0 100%; margin: 0; }
.bp-reward-qr { display: block; max-inline-size: 100%; block-size: auto; border-radius: .5rem; }
.bp-points-total { margin: 0; font-weight: 850; font-size: 1.65rem; color: var(--ink); }
[data-points-page] .r-card h2 { min-width: 0; overflow-wrap: anywhere; }
.bp-tab-settings { border: 2px dotted currentColor; border-radius: 50%; }
.bp-tab-settings::after { content: ''; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; }
.bp-tab-bars { border: 2px solid currentColor; border-radius: 3px; width: 18px; height: 17px; }
.bp-tab-bars::after { content: ''; width: 8px; height: 9px; border: 2px solid currentColor; border-bottom: 0; align-self: end; }
.bp-entry :is(a, button, input):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 350px) {
  .bp-entry-head, .bp-entry-main.r-main { padding-inline: 1rem; }
}

.bp-staff .r-app-top {
  grid-template-columns: auto minmax(0, 1fr);
  gap: .55rem;
  padding: calc(.75rem + env(safe-area-inset-top)) max(1rem, calc((100% - 528px) / 2)) .65rem;
  border-bottom: 1px solid var(--line);
}
.bp-staff .bp-entry-brand { color: var(--ink); }
.bp-staff .bp-entry-brand > span:last-child { color: var(--gold); }
.bp-staff .bp-entry-mark { border-color: var(--gold); }
.bp-staff .bp-entry-mark::after { color: var(--gold); }
.bp-staff .r-current-bar {
  min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: .55rem;
}
.bp-staff .r-app-top .r-bar-name {
  min-width: 0; max-width: 100%; padding: .38rem .65rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--ink); font-size: clamp(.8rem, 3.3vw, 1rem);
}

@media (max-width: 520px) {
  .bp-staff .r-app-top .bp-entry-brand { min-width: 44px; font-size: clamp(1rem, 4vw, 1.2rem); }
  .bp-staff .r-app-top .bp-entry-mark { width: 26px; height: 26px; margin-inline-end: .38rem; }
}
