/* ReyaMon Showdown – Format-Baukasten */
.fb-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.fb-side { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
@media (max-width: 1000px) { .fb-layout { grid-template-columns: 1fr; } .fb-side { position: static; max-height: none; } }

.fb-mech { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.fb-mech label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }

.fb-kind { padding: 12px 0; border-top: 1px solid var(--line); }
.fb-kind:first-of-type { border-top: 0; }
.fb-kind .chips { margin-top: 8px; }
.fb-search { position: relative; margin-top: 8px; }
.fb-search input { width: 100%; }
.fb-sugg { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 4px; max-height: 320px; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.fb-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fb-opt:hover, .fb-opt:focus { background: var(--bg); outline: none; }
.fb-opt .muted { margin-left: auto; }
img.chip-img { width: 28px; height: 28px; image-rendering: pixelated; margin: -8px 2px -8px -4px; vertical-align: middle; }

.chip.allow { border-color: #1f9d5566; color: var(--good); }
.chip.ban { border-color: #d63c3c55; color: var(--accent); }
button.chip { font: inherit; font-size: .86rem; cursor: pointer; }
button.chip:disabled { cursor: default; }
.chip.fb-rule:hover:not(:disabled) { border-color: var(--accent); }
.chip.fb-rule.removed { text-decoration: line-through; opacity: .55; border-style: dashed; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: .9rem; padding: 0 0 0 4px; line-height: 1; }
.chip-x:hover { color: var(--ink); }
.chip-x.allow-x { color: var(--good); font-weight: 700; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); color: var(--muted); font: inherit; font-size: .78rem; padding: 3px 10px; cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--panel); }

.grow-input { flex: 1; min-width: 0; }
.fb-msgs { margin: 10px 0; padding: 8px 10px; border-radius: 6px; font-size: .86rem; display: grid; gap: 4px; }
.fb-msgs.err { background: #d63c3c1a; color: var(--accent); }
.fb-msgs.warn { background: #e0a4001a; color: var(--warn); }
.fb-msgs.ok { background: #1f9d551a; color: var(--good); }
.fb-scroll { max-height: 180px; overflow: auto; }
.fb-actions { display: grid; gap: 8px; }
.fb-actions .btn { justify-content: center; }
.notice { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid #e0a400; padding: 8px 12px; border-radius: 6px; margin: 0 0 14px; font-size: .9rem; }
.chip.allow b, .chip.ban b { font-weight: 700; }
