[data-fb] { all: revert; }

.fb-root {
  --fb-accent: #0097d5;
  --fb-accent-hover: #00658f;
  --fb-accent-rgb: 0,151,213;
  position: fixed; inset: 0; pointer-events: none; z-index: 2147483000;
  font-family: 'Geist', system-ui, sans-serif; color: #0d1b2a;
}
.fb-root *, .fb-root *::before, .fb-root *::after { box-sizing: border-box; }

.fb-panel {
  position: fixed; bottom: 20px; right: 20px; width: 360px; max-height: calc(100vh - 40px);
  background: #FFFFFF; border: 1px solid #e6ebf1; border-radius: 16px;
  box-shadow: 0 20px 60px -15px rgba(13,27,42,0.25), 0 4px 12px rgba(13,27,42,0.06);
  pointer-events: auto; display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .25s ease;
}
.fb-panel[data-dragging="true"] {
  box-shadow: 0 28px 72px -12px rgba(13,27,42,0.35), 0 0 0 2px rgba(var(--fb-accent-rgb),0.3);
  transition: none; cursor: grabbing;
}
.fb-panel[data-collapsed="true"] .fb-body,
.fb-panel[data-collapsed="true"] .fb-footer { display: none; }

.fb-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid #e6ebf1; cursor: grab;
  user-select: none; touch-action: none;
}
.fb-header:active { cursor: grabbing; }
.fb-drag-handle { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; opacity: .35; }
.fb-header:hover .fb-drag-handle { opacity: .7; }
.fb-drag-handle span { width: 14px; height: 1.5px; background: #0d1b2a; border-radius: 1px; display: block; }
.fb-header-title { display: flex; align-items: center; gap: 10px; }
.fb-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--fb-accent);
  box-shadow: 0 0 0 3px rgba(var(--fb-accent-rgb),0.18);
  animation: fb-pulse 2s ease-in-out infinite;
}
@keyframes fb-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--fb-accent-rgb),0.18); }
  50% { box-shadow: 0 0 0 6px rgba(var(--fb-accent-rgb),0.06); }
}
.fb-title-text { font-weight: 700; font-size: 13px; letter-spacing: -0.01em; }
.fb-count { font-size: 11px; color: #3d4a5d; font-weight: 500; margin-top: 1px; }
.fb-chev { width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 6px; color: #3d4a5d; transition: transform .3s ease, background .15s;
  background: transparent; border: none; cursor: pointer;
}
.fb-header:hover .fb-chev { background: #f6f8fb; color: #0d1b2a; }
.fb-panel[data-collapsed="true"] .fb-chev { transform: rotate(180deg); }

.fb-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.fb-pick-btn {
  width: 100%; padding: 11px 14px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--fb-accent) 0%, var(--fb-accent-hover) 50%, var(--fb-accent) 100%);
  color: white; font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
  border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 12px -2px rgba(var(--fb-accent-rgb),0.35);
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.fb-pick-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -2px rgba(var(--fb-accent-rgb),0.45); }
.fb-pick-btn[data-active="true"] { background: #0d1b2a; box-shadow: 0 4px 12px -2px rgba(13,27,42,0.3); }

.fb-hint { margin-top: 10px; font-size: 11px; color: #3d4a5d; text-align: center; line-height: 1.5; }
.fb-kbd {
  display: inline-block; padding: 1px 6px; background: #e6ebf1; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px;
  color: #0d1b2a; font-weight: 600;
}
.fb-empty {
  margin-top: 16px; padding: 20px 16px; text-align: center;
  background: #f6f8fb; border-radius: 10px; color: #3d4a5d; font-size: 12px; line-height: 1.6;
}

.fb-list { margin-top: 14px; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-item {
  padding: 10px 12px; background: #f6f8fb; border: 1px solid #e6ebf1; border-radius: 10px;
  display: flex; gap: 10px; transition: border-color .15s, transform .15s;
  cursor: pointer; font-size: 12px;
}
.fb-item:hover { border-color: var(--fb-accent); transform: translateX(-1px); }
.fb-item-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--fb-accent); color: white; font-weight: 700; font-size: 11px;
  display: grid; place-items: center; line-height: 1;
}
.fb-item-thumb {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 6px;
  background: #fff center/cover no-repeat; border: 1px solid #e6ebf1;
}
.fb-item-thumb.fb-no-img {
  background: #e6ebf1; display: grid; place-items: center; color: #6b7790; font-size: 16px;
}
.fb-item-body { flex: 1; min-width: 0; }
.fb-item-target {
  font-weight: 700; color: #0d1b2a; font-size: 11px; letter-spacing: 0.02em;
  text-transform: uppercase; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fb-item-comment { color: #13243a; line-height: 1.45; word-break: break-word; }
.fb-item-del {
  flex-shrink: 0; width: 22px; height: 22px; border: none; background: transparent;
  color: #6b7790; cursor: pointer; border-radius: 4px; display: grid; place-items: center;
  opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.fb-item:hover .fb-item-del { opacity: 1; }
.fb-item-del:hover { color: #c1121f; background: rgba(220,38,38,0.08); }

.fb-footer {
  padding: 12px 14px; border-top: 1px solid #e6ebf1; background: #f6f8fb;
  display: flex; flex-direction: column; gap: 8px;
}
.fb-footer-row { display: flex; gap: 8px; align-items: center; }
.fb-export-btn {
  flex: 1; padding: 10px 12px; border: 1px solid var(--fb-accent); background: var(--fb-accent);
  color: white; font-weight: 700; font-size: 12px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, transform .1s; font-family: inherit;
}
.fb-export-btn:hover { background: var(--fb-accent-hover); }
.fb-export-btn:active { transform: scale(0.98); }
.fb-export-btn[data-busy="true"] { background: #0d1b2a; cursor: wait; pointer-events: none; }
.fb-export-btn[data-done="true"] { background: #1f9d55; border-color: #1f9d55; }
.fb-copy-btn {
  flex: 1; padding: 10px 12px; border: 1px solid #0d1b2a; background: white;
  color: #0d1b2a; font-weight: 700; font-size: 12px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; transition: background .15s, color .15s;
}
.fb-copy-btn:hover { background: #0d1b2a; color: white; }
.fb-copy-btn[data-copied="true"] { background: #1f9d55; color: white; border-color: #1f9d55; }
.fb-ghost-btn {
  padding: 9px 10px; border: 1px solid #e6ebf1; background: white;
  color: #3d4a5d; font-size: 11px; font-weight: 600; border-radius: 8px; cursor: pointer;
  transition: color .15s, border-color .15s; font-family: inherit;
}
.fb-ghost-btn:hover { color: #0d1b2a; border-color: var(--fb-accent); }

.fb-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 2147482900;
  background: rgba(13,27,42,0.04); backdrop-filter: blur(1px);
  opacity: 0; transition: opacity .2s;
}
.fb-overlay[data-active="true"] { opacity: 1; }
.fb-banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-120%);
  padding: 10px 18px; background: #0d1b2a; color: white; border-radius: 999px;
  font-weight: 600; font-size: 13px; letter-spacing: 0.01em;
  box-shadow: 0 8px 24px -4px rgba(13,27,42,0.35); pointer-events: none;
  z-index: 2147482950; transition: transform .35s cubic-bezier(.16,1,.3,1);
  display: flex; align-items: center; gap: 10px;
}
.fb-banner[data-active="true"] { transform: translateX(-50%) translateY(0); }
.fb-hover-rect {
  position: fixed; pointer-events: none; z-index: 2147482980;
  border: 2px dashed var(--fb-accent); border-radius: 6px;
  background: rgba(var(--fb-accent-rgb),0.06);
  transition: all .1s cubic-bezier(.16,1,.3,1); opacity: 0;
}
.fb-hover-rect[data-active="true"] { opacity: 1; }

.fb-editor {
  position: fixed; width: 320px; background: white; border: 1px solid #e6ebf1;
  border-radius: 12px; box-shadow: 0 16px 48px -12px rgba(13,27,42,0.3);
  padding: 14px; pointer-events: auto; z-index: 2147483050;
  transform: scale(0.96); opacity: 0; transition: transform .2s cubic-bezier(.16,1,.3,1), opacity .15s;
}
.fb-editor[data-active="true"] { transform: scale(1); opacity: 1; }
.fb-editor-label {
  font-size: 11px; font-weight: 700; color: #3d4a5d; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 4px;
}
.fb-editor-target {
  font-size: 12px; color: #0d1b2a; font-weight: 600; margin-bottom: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fb-textarea {
  width: 100%; min-height: 80px; border: 1px solid #e6ebf1; border-radius: 8px;
  padding: 10px 12px; font-family: inherit; font-size: 13px; color: #0d1b2a;
  resize: vertical; outline: none; transition: border-color .15s; background: #f6f8fb;
}
.fb-textarea:focus { border-color: var(--fb-accent); background: white; }
.fb-textarea::placeholder { color: #6b7790; }
.fb-editor-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.fb-save-btn {
  flex: 1; padding: 9px 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--fb-accent) 0%, var(--fb-accent-hover) 50%, var(--fb-accent) 100%);
  color: white; font-weight: 700; font-size: 12px; border-radius: 8px;
  font-family: inherit; transition: filter .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.fb-save-btn:hover { filter: brightness(1.05); }
.fb-save-btn:active { transform: scale(0.98); }
.fb-cancel-btn {
  padding: 9px 10px; border: none; background: transparent; color: #3d4a5d;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.fb-cancel-btn:hover { color: #0d1b2a; }
.fb-editor-hint { margin-left: auto; font-size: 10px; color: #6b7790; }

.fb-badge {
  position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: var(--fb-accent); color: white; font-weight: 800; font-size: 12px;
  display: grid; place-items: center; cursor: pointer; border: 2px solid white;
  box-shadow: 0 2px 8px rgba(var(--fb-accent-rgb),0.45), 0 0 0 1px rgba(13,27,42,0.06);
  pointer-events: auto; z-index: 2147482920; transform: translate(-50%, -50%);
  transition: transform .15s ease, box-shadow .15s; line-height: 1;
  font-family: 'Geist', system-ui, sans-serif;
}
.fb-badge:hover { transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 4px 14px rgba(var(--fb-accent-rgb),0.55); }

.fb-ico { width: 14px; height: 14px; stroke-width: 2.2; flex-shrink: 0; }
.fb-root.fb-picking-on { cursor: crosshair !important; }
.fb-root.fb-picking-on *:not(.fb-panel):not(.fb-panel *) { cursor: crosshair !important; }
.fb-panel, .fb-editor, .fb-banner { user-select: auto; }
