/* The floor's round buttons (floorbuttons.js; iOS FloorHelpButton, FloorHelpList, RivalMoodButton). They sit in the 50 px row above the dock,
   at its right edge, so the camera never moves them: a 44 px bolt, the 34 px rival mood button 8 px above it, and the 44 px offer countdown 8 px left of it. */
#floorbtns { grid-area: 1 / 1; justify-self: end; align-self: center; position: relative; width: 44px; height: 44px; margin-right: 14px; pointer-events: none; z-index: 4; }
#floorbtns > * { pointer-events: auto; }
#stampslot > .stamp { grid-area: 1 / 1; }   /* the end-of-day stamp shares the row */
#floorbtns[hidden] { display: none !important; }
.fb-bolt { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: color-mix(in srgb, var(--accent) 12%, #000);
  background: linear-gradient(color-mix(in srgb, var(--accent) 82%, #fff), color-mix(in srgb, var(--accent) 88%, #000));
  box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 55%, #000), 0 4px 8px rgba(0,0,0,.35); }
.fb-bolt:active { transform: translateY(1px); }
.fb-badge { position: absolute; right: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--stamp); border: 2px solid var(--ink); animation: fb-pop .2s ease-out; }
@keyframes fb-pop { from { transform: scale(0); } }
.fb-mood { position: absolute; left: 5px; top: -42px; width: 34px; height: 34px; border-radius: 50%; background: var(--deep); box-shadow: 0 3px 4px rgba(0,0,0,.35); display: grid; place-items: center; }
.fb-mood svg { position: absolute; inset: 0; }
.fb-mood circle { fill: none; stroke-width: 3; }
.fb-mood .trk { stroke: rgba(243,235,216,.16); }
.fb-mood .arc { stroke: var(--teal); stroke-linecap: round; }
.fb-mood.warn .arc { stroke: var(--accent); } .fb-mood.bad .arc { stroke: var(--stamp); }
.fb-mood .sym { position: relative; display: grid; place-items: center; color: rgba(243,235,216,.85); }
.fb-mood.attacking .sym { color: var(--stamp); }
.fb-mood.attacking { animation: fb-beat .9s ease-in-out infinite alternate; }
@keyframes fb-beat { to { transform: scale(1.08); } }
.fb-offer { position: absolute; right: 52px; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--deep); box-shadow: 0 3px 4px rgba(0,0,0,.35); display: grid; place-items: center; color: var(--ink); }
.fb-offer[hidden] { display: none; }
.fb-offer svg { position: absolute; inset: 0; }
.fb-offer circle { fill: none; stroke-width: 3; }
.fb-offer .trk { stroke: rgba(243,235,216,.16); }
.fb-offer .arc { stroke: var(--accent); stroke-linecap: round; }
.fb-offer.last .arc { stroke: var(--stamp); }
.fb-offer .sym { position: relative; display: grid; justify-items: center; line-height: 1; }
.fb-offer b { font-size: 13px; font-variant-numeric: tabular-nums; }
.fb-offer:active { transform: translateY(1px); }
.fb-bolt:focus-visible, .fb-mood:focus-visible, .fb-offer:focus-visible, .fb-next:focus-visible, .fb-buy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The popover: 292 pt wide, 420 at most, opening upward from the bolt and right-aligned to it. */
.fb-pop { position: absolute; right: -4px; bottom: calc(100% + 10px); width: min(292px, calc(100vw - 24px)); max-height: min(420px, 62dvh); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px; display: grid; gap: 8px; align-content: start; border-radius: 16px; background: color-mix(in srgb, var(--deep) 96%, transparent);
  border: 1px solid rgba(243,235,216,.18); box-shadow: 0 10px 28px rgba(0,0,0,.45); animation: fb-in .16s ease-out; color: var(--ink); }
@keyframes fb-in { from { opacity: 0; transform: translateY(6px); } }
.fb-title { margin: 0; display: flex; align-items: flex-end; gap: 6px; color: var(--accent); font-size: 19px; font-weight: 400; line-height: 1.1; }
.fb-title .sf { margin-bottom: 3px; }
/* His head rises into the title row, so the row is as tall as the worker while he shows (the height is read from his art). */
html:not(.no-workers) .fb-title.has-worker { min-height: var(--fb-title-h, 78px); }
.fb-nextwrap { position: relative; }
.fb-next { position: relative; z-index: 1; width: 100%; text-align: left; display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--paper) 82%, #000);
  box-shadow: inset 3px 0 0 var(--accent); }
.fb-next .t { font: 600 13px/1.35 system-ui, sans-serif; color: var(--ink); }
.fb-next .go { display: flex; align-items: center; gap: 6px; color: var(--accent); font: 700 13px system-ui, sans-serif; }
.fb-next .go b { flex: 1; font-weight: 700; }
/* The worker stands on the card's top edge (the same crop as the answer card's: the frame's bottom 5 of 73 hides behind it). */
.worker.ideas { clip-path: inset(0 0 var(--wk-ideas-hide) 0); height: var(--wk-ideas-height); width: var(--wk-ideas-width); right: var(--wk-ideas-inset); bottom: calc(100% - var(--wk-ideas-hide)); z-index: 0; }
.fb-sec { display: grid; gap: 2px; padding-top: 4px; }
.fb-sec b { font-size: 15px; letter-spacing: .09em; font-weight: 400; color: var(--ink); }
.fb-sec span { font: 12px system-ui, sans-serif; color: rgba(243,235,216,.72); }
.fb-buy { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 8px 9px; text-align: left; border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 82%, #000); border: 1px solid rgba(243,235,216,.1); }
.fb-buy.off { opacity: .6; }
.fb-ic { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: rgba(243,235,216,.6); background: rgba(243,235,216,.16); }
.fb-ic.on { color: var(--accent); background: rgba(242,165,65,.16); }
.fb-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.fb-tx b { font: 600 14px/1.2 system-ui, sans-serif; color: var(--ink); }
.fb-tx span { font: 600 12px/1.2 system-ui, sans-serif; color: rgba(243,235,216,.62); }
.fb-tx span.good { color: var(--teal); } .fb-tx span.bad { color: var(--stamp); }
.fb-price { flex: none; display: inline-flex; align-items: baseline; gap: 1px; padding: 5px 9px; border-radius: 999px; background: rgba(243,235,216,.16); color: var(--ink); font-size: 14px; }
.fb-price small { font: 600 11px system-ui, sans-serif; opacity: .75; }
.fb-price.amber { background: var(--accent); color: color-mix(in srgb, var(--accent) 12%, #000); }
.fb-short { margin: -4px 4px 0; font: 12px system-ui, sans-serif; color: rgba(243,235,216,.62); }
.fb-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(243,235,216,.07); }
.fb-note .sf { flex: none; color: var(--teal); margin-top: 1px; }
.fb-note p { font: 12.5px/1.35 system-ui, sans-serif; color: rgba(243,235,216,.92); }
@media (hover: hover) { .fb-bolt:hover, .fb-mood:hover { filter: brightness(1.1); } .fb-next:hover, .fb-buy:not(:disabled):hover { background: color-mix(in srgb, var(--paper) 70%, var(--ink) 8%); } }
@media (prefers-reduced-motion: reduce) { .fb-mood.attacking { animation: none; } .fb-pop, .fb-badge { animation: none; } }
