body.portal { line-height: 1.6; }
.bb-shell { max-width: 860px; margin: 0 auto; padding: 24px 16px 56px; }
.bb-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.bb-intro .lead { font-size: 17px; }
.bb-tool { min-width: 0; margin: 22px 0 36px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bb-label { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 16px; }
.bb-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.bb-hint { color: var(--muted); font-size: 14px; }
.bb-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; width: 100%; max-width: 400px; margin: 12px auto; padding: 6px; box-sizing: border-box; border-radius: 12px; background: #7d7a72; }
.bb-cell { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 4px; background: #e9e6dd; color: #fff; font: 800 22px/1 system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
.bb-occupied { background: #385f8e; box-shadow: inset 2px 2px 0 #ffffff40, inset -2px -2px 0 #00000030; }
.bb-suggested { background: #16784e; }
.bb-clearing { outline: 3px dashed #ffd35c; outline-offset: -4px; }
.bb-cell:focus-visible, .bb-chip:focus-visible, .bb-shape:focus-visible { outline: 3px solid #1f6feb; outline-offset: 2px; position: relative; z-index: 1; }
.bb-edit { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-chip, .bb-shape { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; touch-action: manipulation; }
.bb-chip:hover, .bb-shape:hover:not(:disabled) { border-color: var(--accent); }
.bb-shape:disabled { opacity: .45; cursor: default; }
.bb-library { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; }
.bb-shape { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; }
.bb-mini { display: inline-grid; grid-template-columns: repeat(var(--width), 12px); grid-auto-rows: 12px; gap: 2px; flex-shrink: 0; }
.bb-mini-filled { background: #385f8e; border-radius: 2px; }
.bb-tray { display: grid; gap: 8px; padding: 0; list-style: none; }
.bb-tray li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.bb-rotation { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.bb-rotation input { width: 20px; height: 20px; }
.bb-status { min-height: 3.2em; margin: 12px 0; font-size: 14px; }
.bb-solve { width: 100%; }
.bb-result { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.bb-result h2 { font-size: 22px; }
.bb-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; font-size: 14px; }
.bb-legend li { display: flex; align-items: center; gap: 8px; }
.bb-key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; color: #fff; }
.bb-article h2 { margin-top: 30px; font-size: 24px; }
.bb-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bb-faq summary { font-weight: 750; cursor: pointer; }
.bb-cta { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.bb-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (min-width: 640px) {
  .bb-shell { padding: 36px 24px 64px; }
  .bb-tool { padding: 22px; }
}
