/* Build-A-Bean (build-a-bean-v1, 27 Oct 2026). Beanville tokens (beanville.css): --bg --surface --surface-2 --edge --text
   --muted --line --sign --butter-soft --accent. The workshop sign is warm orange so the page reads as "make your own". */
body.bb-page { --bb-sign: #E8743B; --bb-sign-2: #C95A26; --bb-sign-ink: #FFF6E6; --bb-butter: #FFC93C; --bb-ok: #2F7D4F; --bb-bad: #B3412E; }
body.bb-page[data-theme="dark"] { --bb-sign: #9C4A22; --bb-sign-2: #7A3815; --bb-ok: #6FCF97; --bb-bad: #FF8A73; }
body.bb-page[data-theme="dood"] { --bb-sign: #3a1166; --bb-sign-2: #24093f; --bb-butter: #ff3ea5; --bb-ok: #7CFFB2; --bb-bad: #FF8A73; }

.bb-hero h1 { margin-bottom: 6px; }
.bb-sign { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: center; margin: 0 0 16px; padding: 16px 18px;
  border-radius: 22px; border: 3px solid var(--edge); box-shadow: 0 5px 0 var(--edge); background: linear-gradient(180deg, var(--bb-sign), var(--bb-sign-2)); color: var(--bb-sign-ink); overflow: hidden; }
.bb-sign::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: repeating-linear-gradient(90deg, #FFC93C 0 14px, #2B1B14 14px 28px); opacity: .85; }
body.bm-page main.bm-wrap .bb-sign h2 { color: var(--bb-sign-ink) !important; margin: 4px 0 0; font-size: clamp(20px, 4.6vw, 26px); }
body.bm-page main.bm-wrap .bb-sign p { color: var(--bb-sign-ink) !important; opacity: .94; margin: 4px 0 0; font-size: 14.5px; max-width: 62ch; }
.bb-price { display: grid; justify-items: center; background: #FFF6E6; color: #2B1B14; border: 3px solid #2B1B14; border-radius: 18px; padding: 6px 14px 8px; box-shadow: 0 4px 0 #2B1B14; transform: rotate(2deg); min-width: 96px; }
.bb-price .k { font: 700 11px var(--f-body); text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.bb-price b { font-family: "Bagel Fat One", var(--f-body), system-ui; font-size: 34px; line-height: 1; }
.bb-price .s { font: 700 12px var(--f-mono, monospace); }
@media (max-width: 560px) { .bb-sign { grid-template-columns: 1fr; } .bb-price { justify-self: start; grid-auto-flow: column; align-items: baseline; gap: 6px; transform: rotate(-1deg); } .bb-price b { font-size: 26px; } }

.bb-room { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
.bb-room > * { min-width: 0; }
/* every part of the page stays inside the screen (the layer and rarity rows scroll sideways on their own) */
body.bb-page main.bm-wrap > * { min-width: 0; max-width: 100%; }
.bb-shelfcol, .bb-stagecol, .bb-filter { min-width: 0; max-width: 100%; }
@media (min-width: 880px) { .bb-room { grid-template-columns: 340px 1fr; align-items: start; } .bb-stagecol { position: sticky; top: 76px; } }
.bb-card { background: var(--surface); border: 3px solid var(--edge); border-radius: 22px; box-shadow: 0 5px 0 var(--edge); padding: 12px; color: var(--text); }
.bb-stage { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 2px solid var(--edge); background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0/22px 22px; }
.bb-layers img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.bb-tag { position: absolute; left: 8px; top: 8px; z-index: 2; background: #2B1B14; color: #FFF6E6; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 3px 9px; }
.bb-check { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; min-height: 2.6em; }
.bb-check.ok { color: var(--bb-ok); }
.bb-check.taken, .bb-check.bad, .bb-check.error { color: var(--bb-bad); }
.bb-check.checking { color: var(--muted); }
.bb-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
body.bm-page main.bm-wrap .bb-tools .btn { min-height: 40px; padding: 6px 10px !important; font-size: 14px; white-space: nowrap; }
.bb-picks { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 13.5px; }
.bb-picks button { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 1px dashed var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; padding: 4px 2px; cursor: pointer; }
.bb-picks button:hover { background: var(--surface-2); }
.bb-picks span { color: var(--muted); min-width: 82px; }
.bb-picks b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-picks i { font-weight: 500; color: var(--muted); }
.bb-picks i.need { color: var(--bb-bad); font-weight: 700; }
.bb-picks .bm-tier { font-size: 10px; }
body.bm-page main.bm-wrap .bb-go { width: 100%; margin-top: 12px; min-height: 52px; font-size: 17px; }
body.bm-page main.bm-wrap .bb-go:disabled { opacity: .5; cursor: default; }
.bb-fine { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.bb-shelfhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
body.bm-page main.bm-wrap .bb-shelfhead h2 { margin: 0; font-size: 24px; }
.bb-count { font: 600 13px var(--f-mono, monospace); color: var(--muted); }
.bb-slots, .bb-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.bb-slot { flex: none; scroll-snap-align: start; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--text); padding: 6px 12px; font: 700 14px var(--f-body); cursor: pointer; min-height: 40px; white-space: nowrap; }
.bb-slot small { color: var(--bb-bad); font-size: 10px; vertical-align: 2px; }
.bb-slot.on::after { content: "✓"; margin-left: 5px; color: var(--bb-ok); }
.bb-slot[aria-pressed="true"] { background: var(--bb-butter); color: #2B1B14; box-shadow: 0 3px 0 var(--edge); }
.bb-slot[aria-pressed="true"].on::after { color: #2B1B14; }
.bb-filter { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.bb-filter .bb-chips { flex: 1 1 auto; padding-bottom: 6px; }
.bb-filter input[type="search"] { flex: 0 1 220px; min-width: 0; min-height: 38px; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--text); padding: 4px 14px; font: 500 14px var(--f-body); margin-bottom: 6px; }
.bb-chip { flex: none; border: 2px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); padding: 4px 11px; font: 600 13.5px var(--f-body); cursor: pointer; min-height: 36px; }
.bb-chip[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.bb-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); }
.bb-item { position: relative; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); padding: 5px; cursor: pointer; text-align: left; display: grid; gap: 3px; align-content: start; box-shadow: 0 3px 0 rgba(43, 27, 20, .12); font-family: var(--f-body); }
.bb-item:hover { border-color: var(--edge); }
.bb-item[aria-pressed="true"] { border-color: var(--edge); background: var(--butter-soft, #FFE9A8); box-shadow: 0 3px 0 var(--edge); }
.bb-item[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: #2B1B14; color: #FFF6E6; font: 700 13px/22px var(--f-body); text-align: center; z-index: 2; }
.bb-item:focus-visible, .bb-slot:focus-visible, .bb-chip:focus-visible { outline: 3px solid var(--bb-butter); outline-offset: 2px; }
.bb-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: var(--surface-2); font-size: 28px; }
.bb-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.bb-thumb img.under { opacity: .35; }
.bb-ph { opacity: .6; }
.bb-iname { font-size: 12.5px; font-weight: 600; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.3em; }
.bb-badges .bm-tier { font-size: 10px; }
.bb-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 20px 8px; }
.bb-how { margin-top: 18px; }
.bb-how ol { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px; }

@media (max-width: 879px) {
  .bb-room { display: block; }
  .bb-shelfcol { margin-top: 12px; }
  /* the design stays in view under the site's fixed header while you browse the traits */
  .bb-stagecol { position: sticky; top: 66px; z-index: 5; background: var(--bg); padding: 4px 0 8px; }
  .bb-stagecard { display: grid; grid-template-columns: 40% 1fr; gap: 10px; padding: 10px; }
  .bb-side { display: flex; flex-direction: column; min-width: 0; }
  .bb-check { margin: 0; font-size: 12.5px; min-height: 0; }
  .bb-tools { margin-top: 6px; gap: 6px; }
  body.bm-page main.bm-wrap .bb-tools .btn { min-height: 36px; font-size: 13px; padding: 4px 6px !important; }
  .bb-picks, .bb-fine { display: none; }
  body.bm-page main.bm-wrap .bb-go { margin-top: auto; min-height: 44px; font-size: 14.5px; padding: 6px 8px !important; }
  .bb-shelf { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding: 8px; }
}

/* The site sets overflow-x:hidden on html and body, which makes body a scroll box that never scrolls, so a sticky design
   can't stick. On this page only: clip (same look, no scroll box). */
html:has(body.bb-page), body.bb-page { overflow-x: clip !important; overflow-y: visible !important; }
